﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using Microsoft.Win32.SafeHandles;

namespace JasLib.Interop.Win32
{
    public static partial class KERNEL32
    {
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "AllocConsole", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool AllocConsole();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "AttachConsole", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool AttachConsole([In] uint dwProcessId = Constants.ATTACH_PARENT_PROCESS);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "Beep", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool Beep(
            [In] uint dwFreq,
            [In] uint dwDuration);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CancelIo", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CancelIo([In] SafeFileHandle hFile);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CancelIoEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CancelIoEx(
            [In] SafeFileHandle hFile,
            [In] UINT_PTR lpOverlapped);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CancelSynchronousIo", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CancelSynchronousIo(SafeThreadHandle hThread);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CloseHandle", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CloseHandle([In] HANDLE hObject);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ClosePrivateNamespace", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool ClosePrivateNamespace(
            HANDLE Handle,
            PRIVATE_NAMESPACE_FLAG Flags);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CopyFileW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool CopyFile(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpNewFileName,
            [In, MarshalAs(UnmanagedType.Bool)] bool bFailIfExists);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CopyFileExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CopyFileEx(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpNewFileName,
            [In] CopyProgressRoutine lpProgressRoutine,
            [In] UINT_PTR lpData,
            [In] UINT_PTR pbCancel,
            [In] CopyFileFlags dwCopyFlags);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateBoundaryDescriptorW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE CreateBoundaryDescriptor(string Name, uint Flags = 0);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateDirectoryW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CreateDirectory(
            [In] string lpPathName,
            [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateDirectoryExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CreateDirectoryEx(
            [In] string lpTemplateDirectory,
            [In] string lpNewDirectory,
            [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes);
        
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateDirectoryTransactedW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CreateDirectoryTransacted(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpTemplateDirectory,
            [In] string lpNewDirectory,
            [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes,
            [In] HANDLE hTransaction);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "CreateEventW", CharSet = CharSet.Unicode)]
        public static extern HANDLE CreateEvent(
            [In] ref SECURITY_ATTRIBUTES lpEventAttributes,
            [In, MarshalAs(UnmanagedType.Bool)] bool bManualReset,
            [In, MarshalAs(UnmanagedType.Bool)] bool bInitialState,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpName = null);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "CreateEventExW", CharSet = CharSet.Unicode)]
        public static extern HANDLE CreateEventEx(
            [In] ref SECURITY_ATTRIBUTES lpEventAttributes,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpName,
            [In] CreateEventFlags dwFlags,
            [In] EventAccessRights dwDesiredAccess);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "CreateFileW", CharSet = CharSet.Unicode)]
        public static extern HANDLE CreateFile(
            string lpFileName,
            FileAccessRights dwDesiredAccess,
            FileShareMode dwShareMode,
            [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes,
            FileCreationDisposition dwCreationDisposition,
            FileFlagsAndAttributes dwFlagsAndAttributes,
            HANDLE hTemplateFile);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateFileTransactedW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE CreateFileTransacted(
            [In] string lpFileName,
            [In] FileAccessRights dwDesiredAccess,
            [In] FileShareMode dwShareMode,
            [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes,
            [In] FileCreationDisposition dwCreationDisposition,
            [In] FileFlagsAndAttributes dwFlagsAndAttributes,
            [In] HANDLE hTemplateFile,
            [In] HANDLE hTransaction,
            [In] ref ushort pusMiniVersion,
            [In] UINT_PTR pExtendedParameter);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateIoCompletionPort", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE CreateIoCompletionPort(
            HANDLE FileHandle,
            HANDLE ExistingCompletionPort,
            UINT_PTR CompletionKey,
            uint NumberOfConcurrentThreads);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreatePrivateNamespaceW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE CreatePrivateNamespace(
            ref SECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
            UINT_PTR lpBoundaryDescriptor,
            string lpAliasPrefix);

        /// <summary>
        /// </summary>
        /// <param name="lpEnvironment">If this parameter is non-null, then you MUST include CREATE_UNICODE_ENVIRONMENT in dwCreationFlags otherwise it will be parsed as an ANSI string.</param>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateProcessW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool CreateProcess(
            [In] string lpApplicationName,
            [In] string lpCommandLine,
            [In] ref SECURITY_ATTRIBUTES lpProcessAttributes,
            [In] ref SECURITY_ATTRIBUTES lpThreadAttributes,
            [In] bool bInheritHandles,
            [In] CreateProcessFlags dwCreationFlags,
            [In] string lpEnvironment,
            [In] string lpCurrentDirectory,
            [In] ref STARTUPINFOEX lpStartupInfo,
            [Out] out PROCESS_INFORMATION lpProcessInformation);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "CreateThread", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern SafeThreadHandle CreateThread(
            [In] ref SECURITY_ATTRIBUTES lpThreadAttributes,
            [In] UINT_PTR dwStackSize,
            [In] THREAD_START_ROUTINE lpStartAddress,
            [In] UINT_PTR lpParameter,
            [In] CreateThreadFlags dwCreationFlags,
            [Out] out uint lpThreadId);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, CharSet = CharSet.Auto)]
        public static extern HANDLE CreateToolhelp32Snapshot(
            [In] SnapshotFlags dwFlags,
            [In] uint th32ProcessID);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DeleteBoundaryDescriptor", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void DeleteBoundaryDescriptor(HANDLE BoundaryDescriptor);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "DeleteFileW", CharSet = CharSet.Unicode)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool DeleteFile(string lpFileName);

        /// <param name="lpAttributeList">LPPROC_THREAD_ATTRIBUTE_LIST</param>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DeleteProcThreadAttributeList", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void DeleteProcThreadAttributeList(
            [In] UINT_PTR lpAttributeList);

        /// <summary>
        /// Use this override to duplicate thread handles.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DuplicateHandle", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool DuplicateHandle(
            [In] SafeProcessHandle hSourceProcessHandle,
            [In] SafeThreadHandle hSourceHandle,
            [In] SafeProcessHandle hTargetProcessHandle,
            [Out] out SafeThreadHandle lpTargetHandle,
            [In] ThreadAccessRights dwDesiredAccess = ThreadAccessRights.GENERIC_ALL,
            [In] bool bInheritHandle = false,
            [In] DuplicateHandleOptions dwOptions = 0);

        /// <summary>
        /// Use this override to duplicate process handles.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DuplicateHandle", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool DuplicateHandle(
            [In] SafeProcessHandle hSourceProcessHandle,
            [In] SafeProcessHandle hSourceHandle,
            [In] SafeProcessHandle hTargetProcessHandle,
            [Out] out SafeProcessHandle lpTargetHandle,
            [In] ProcessAccessRights dwDesiredAccess = ProcessAccessRights.GENERIC_ALL,
            [In] bool bInheritHandle = false,
            [In] DuplicateHandleOptions dwOptions = 0);

        /// <summary>
        /// Use this override to duplicate event handles.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DuplicateHandle", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool DuplicateHandle(
            [In] SafeProcessHandle hSourceProcessHandle,
            [In] SafeKernelEventHandle hSourceHandle,
            [In] SafeProcessHandle hTargetProcessHandle,
            [Out] out SafeKernelEventHandle lpTargetHandle,
            [In] EventAccessRights dwDesiredAccess = EventAccessRights.GENERIC_ALL,
            [In] bool bInheritHandle = false,
            [In] DuplicateHandleOptions dwOptions = 0);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DuplicateToken", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool DuplicateToken(
            [In] HANDLE ExistingTokenHandle,
            [In] SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
            [Out] out HANDLE phNewToken);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "DuplicateTokenEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool DuplicateTokenEx(
            [In] HANDLE hExistingToken,
            [In] TokenAccessRights dwDesiredAccess,
            [In] ref SECURITY_ATTRIBUTES lpTokenAttributes,
            [In] SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
            [In] TOKEN_TYPE TokenType,
            [Out] out HANDLE phNewToken);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ExitProcess", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void ExitProcess([In] uint uExitCode);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FatalAppExitW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void FatalAppExit(
            [In] uint uAction,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpFileName);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FatalExit", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void FatalExit([In] int ExitCode);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FileTimeToSystemTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FileTimeToSystemTime(
            [In] ref FILETIME lpFileTime,
            [Out] out SYSTEMTIME lpSystemTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FindFirstFileW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE FindFirstFile(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
            [Out] out WIN32_FIND_DATA lpFindFileData);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FindFirstStreamW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE FindFirstStreamW(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
            [In] STREAM_INFO_LEVELS InfoLevel,
            [Out] out WIN32_FIND_STREAM_DATA lpFindStreamData,
            [In] uint dwFlags = 0);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FindFirstStreamTransactedW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE FindFirstStreamTransactedW(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
            [In] STREAM_INFO_LEVELS InfoLevel,
            [Out] out WIN32_FIND_STREAM_DATA lpFindStreamData,
            [In] uint dwFlags,
            [In] HANDLE hTransaction);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FindNextFileW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FindNextFile(
            [In] HANDLE hFindFile,
            [Out] out WIN32_FIND_DATA lpFindFileData);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FindNextStreamW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FindNextStreamW(
            [In] HANDLE hFindStream,
            [Out] out WIN32_FIND_STREAM_DATA lpFindStreamData);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FindClose", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FindClose(HANDLE hFindFile);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FlushFileBuffers", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FlushFileBuffers([In] HANDLE hFile);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FormatMessageW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void FormatMessage(
            [In] FormatMessageFlags dwFlags,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpSource,
            [In] uint uiMessageId,
            [In] uint dwLanguageId,
            [Out] out UINT_PTR lpBuffer,
            [In] uint nSize,
            [In] UINT_PTR[] Arguments);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FreeConsole", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FreeConsole();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "FreeLibrary", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool FreeLibrary([In] HINSTANCE hModule);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetActiveProcessorCount", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetActiveProcessorCount();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetCommandLineW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR GetCommandLine();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetComputerNameW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetComputerName(
            [Out] StringBuilder lpBuffer,
            [In, Out] ref uint lpnSize);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetComputerNameExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetComputerNameEx(
            [In] COMPUTER_NAME_FORMAT NameType,
            [Out] StringBuilder lpBuffer,
            [In, Out] ref uint lpnSize);

        /// <summary>
        /// Safe overload for the Win32 GetComputerNameEx function that throws an exception on failure.
        /// </summary>
        public static string GetComputerNameEx(COMPUTER_NAME_FORMAT NameType)
        {
            uint uiSize = 0;

            if (!GetComputerNameEx(NameType, null, ref uiSize))
            {
                if (GetLastError() != Win32ErrorCode.ERROR_MORE_DATA)
                    throw new Win32Exception();
            }

            StringBuilder sb = new StringBuilder((int)uiSize);
            if (!GetComputerNameEx(NameType, sb, ref uiSize))
                throw new Win32Exception();
            return sb.ToString(0, (int)uiSize);
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetConsoleProcessList", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetConsoleProcessList(
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] uint[] lpdwProcessList = null,
            [In] uint dwProcessCount = 0);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetCurrentProcess", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern SafeProcessHandle GetCurrentProcess();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetCurrentProcessId", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetCurrentProcessId();

        /// <summary>
        /// NOTE: I wish there were a way to specify that we don't own the return handle.
        /// Closing it will be harmless, but still...
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetCurrentThread", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern SafeThreadHandle GetCurrentThread();

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetCurrentThreadId", CharSet = CharSet.Unicode)]
        public static extern uint GetCurrentThreadId();

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetDllDirectoryW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
        public static extern uint GetDllDirectory(
            [In] uint nBufferLength,
            [Out] StringBuilder sb);

        /// <summary>
        /// Safe overload for the Win32 GetDllDirectory function that throws an exception on failure.
        /// </summary>
        public static string GetDllDirectory()
        {
            StringBuilder sb = new StringBuilder(0);

            while (true)
            {
                uint uiLength = GetDllDirectory((uint)sb.Capacity, sb);
                if (uiLength == 0)
                {
                    if (GetLastError() == Win32ErrorCode.ERROR_SUCCESS)
                        return string.Empty;
                    else
                        throw new Win32Exception();
                }
                else if (uiLength > sb.Capacity)
                    sb.Capacity = (int)uiLength;
                else
                {
                    sb.Length = (int)uiLength;
                    return sb.ToString();
                }
            }
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetExitCodeThread", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetExitCodeThread([In] HANDLE hThread, out uint lpExitCode);

        /// <summary>
        /// Convenient wrapper for the GetExitCodeThread Win32 function that throws an exception on failure.
        /// </summary>
        public static uint GetExitCodeThread(HANDLE hThread)
        {
            uint uiExitCode;
            if (!GetExitCodeThread(hThread, out uiExitCode))
                throw new Win32Exception();
            return uiExitCode;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetExitCodeProcess", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetExitCodeProcess([In] HANDLE hProcess, out uint lpExitCode);

        /// <summary>
        /// Convenient overload for the Win32 GetExitCodeProcess function that throws an exception on failure.
        /// </summary>
        public static uint GetExitCodeProcess(HANDLE hProcess)
        {
            uint uiExitCode;
            if (!GetExitCodeProcess(hProcess, out uiExitCode))
                throw new Win32Exception();
            return uiExitCode;
        }

        /// <summary>
        /// Convenient overload for the Win32 GetExitCodeProcess function that throws an exception on failure.
        /// </summary>
        public static uint GetExitCodeProcess(uint uiProcessId)
        {
            HANDLE hProcess = OpenProcess(ProcessAccessRights.PROCESS_QUERY_INFORMATION, false, uiProcessId);
            if (hProcess.IsNullOrInvalid)
                throw new Win32Exception();

            uint uiExitCode;
            try
            {
                if (!GetExitCodeProcess(hProcess, out uiExitCode))
                    throw new Win32Exception();
            }
            finally
            {
                CloseHandle(hProcess);
            }
            return uiExitCode;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetFileAttributesW", CharSet = CharSet.Unicode)]
        public static extern FileFlagsAndAttributes GetFileAttributes([In] string lpFileName);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetFileAttributesExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetFileAttributesEx(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
            [In] GET_FILEEX_INFO_LEVELS fInfoLevelId,
            [Out] out WIN32_FILE_ATTRIBUTE_DATA lpFileInformation);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetFileAttributesTransactedW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetFileAttributesTransacted(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
            [In] GET_FILEEX_INFO_LEVELS fInfoLevelId,
            [Out] out WIN32_FILE_ATTRIBUTE_DATA lpFileInformation,
            [In] HANDLE hTransaction);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetFileSizeEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool GetFileSizeEx(
            [In] HANDLE hFile,
            [Out] out long lpFileSize);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetFileType", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern FileType GetFileType([In] HANDLE hFile);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetHandleInformation", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetHandleInformation([In] HANDLE hObject, out HandleInformationFlags lpdwFlags);

        /// <summary>
        /// Gets the Win32 error code from the last marshaled Interop.Win32 call.
        /// Does not actually call KERNEL32.GetLastError().
        /// </summary>
        public static Win32ErrorCode GetLastError()
        {
            /// Sneaky!
            return (Win32ErrorCode)Marshal.GetLastWin32Error();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetLogicalDrives", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetLogicalDrives();

        /// <summary>
        /// Convenient wrapper for the GetLogicalDrives Win32 function that returns an array of drive letter characters and throws an exception on failure.
        /// </summary>
        public static char[] GetLogicalDrives(bool bUpperCase)
        {
            uint uiDriveFlags = KERNEL32.GetLogicalDrives();
            if (uiDriveFlags == 0 && KERNEL32.GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();

            char chStart = bUpperCase ? 'A' : 'a';

            List<char> driveList = new List<char>(32);
            for (int iIndex = 0; uiDriveFlags != 0; uiDriveFlags >>= 1, iIndex++)
            {
                if ((uiDriveFlags & 1) == 1)
                    driveList.Add((char)(chStart + iIndex));
            }
            return driveList.ToArray();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetLogicalDriveStringsW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetLogicalDriveStrings(
            [In] uint nBufferLength = 0,
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] char[] lpBuffer = null);

        /// <summary>
        /// Safe wrapper for the GetLogicalDriveStrings Win32 function that throws an exception on failure.
        /// </summary>
        public static IEnumerable<string> GetLogicalDriveStrings()
        {
            /// Get the necessary buffer size.
            int iLength = (int)GetLogicalDriveStrings(0, null);
            if (iLength == 0 && GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();

            /// Grab the strings.
            char[] buffer = new char[iLength];
            iLength = (int)GetLogicalDriveStrings((uint)iLength, buffer);
            if (iLength == 0 && GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();

            return InteropUtilities.SplitDoubleNullTerminated(buffer);
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetLongPathNameW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetLongPathName(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpszShortPath,
            [Out] StringBuilder lpszLongPath,
            [In] uint cchBuffer);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetLongPathNameTransactedW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetLongPathNameTransacted(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpszShortPath,
            [Out] StringBuilder lpszLongPath,
            [In] uint cchBuffer,
            [In] HANDLE hTransaction);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetModuleHandleW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HINSTANCE GetModuleHandle([In] string lpModuleName);

        /// <summary>
        /// When using this override, make sure you are NOT using the GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS flag.
        /// If the module's reference count is incremented, the caller must use the FreeLibrary function to decrement the reference count when the module handle is no longer needed.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetModuleHandleExW", CharSet = CharSet.Unicode)]
        public static extern bool GetModuleHandleEx([In] GetModuleHandleExFlags dwFlags, [In, Optional] string lpModuleName, [Out] out HINSTANCE phModule);

        /// <summary>
        /// This override is best suited for the GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS flag.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetModuleHandleExW", CharSet = CharSet.Unicode)]
        public static extern bool GetModuleHandleEx(
            [In] GetModuleHandleExFlags dwFlags,
            [In] UINT_PTR lpModuleName,
            [Out] out HINSTANCE phModule);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetModuleFileNameW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
        public static extern uint GetModuleFileName(
            [In] HINSTANCE hModule,
            [Out] StringBuilder lpFileName,
            [In] uint nSize);

        /// <summary>
        /// Safe wrapper for the GetModuleFileName Win32 function that throws an exception on failure.
        /// </summary>
        public static string GetModuleFileName(HINSTANCE hModule, int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            sb.Length = (int)GetModuleFileName(hModule, sb, (uint)sb.Capacity);
            if (sb.Length == 0 && GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();
            return sb.ToString();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetModuleFileNameExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
        public static extern uint GetModuleFileNameEx(
            [In] HANDLE hProcess,
            [In] HINSTANCE hModule,
            [Out] StringBuilder lpFileName,
            [In] uint nSize);

        /// <summary>
        /// Safe wrapper for the GetModuleFileNameEx Win32 function that throws an exception on failure.
        /// </summary>
        public static string GetModuleFileNameEx(HANDLE hProcess, HINSTANCE hModule = default(HINSTANCE), int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            sb.Length = (int)GetModuleFileNameEx(hProcess, hModule, sb, (uint)sb.Capacity);
            if (sb.Length == 0 && GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();
            return sb.ToString();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetNativeSystemInfo", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void GetNativeSystemInfo([Out] out SYSTEM_INFO lpSystemInfo);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetOEMCP", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetOEMCP();

        /// <summary>
        /// "Warning! GetOverlappedResult writes to the address of the buffer specified in the ORIGINAL OPERATION
        /// (ie/ ReadFile or WriteFile). .NET may move the address of the buffer before GetOverlappedResult 
        /// returns, resulting in a buffer overflow.
        /// Use AllocHGlobal and FreeHGlobal or otherwise ensure the buffer is pinned between the two calls.
        /// </summary>
        /// <param name="hFile"></param>
        /// <param name="lpOverlapped"></param>
        /// <param name="lpNumberOfBytesTransferred"></param>
        /// <param name="bWait"></param>
        /// <returns></returns>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetOverlappedResult", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public unsafe static extern bool GetOverlappedResult(
            [In] HANDLE hFile,
            [In] OVERLAPPED* lpOverlapped,
            [Out] out uint lpNumberOfBytesTransferred,
            [In, MarshalAs(UnmanagedType.Bool)] bool bWait);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcAddress", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR GetProcAddress(
            [In] HINSTANCE hModule,
            [In, MarshalAs(UnmanagedType.LPStr)] string lpProcName);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessAffinityMask", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool GetProcessAffinityMask(
            [In] HANDLE hProcess,
            [Out] out UINT_PTR lpProcessAffinityMask,
            [Out] out UINT_PTR lpSystemAffinityMask);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessHandleCount", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetProcessHandleCount(
            [In] HANDLE hProcess,
            [In, Out] ref uint pdwHandleCount);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessHeap", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE GetProcessHeap();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessHeaps", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetProcessHeaps(
            [In] uint NumberOfHeaps,
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] HANDLE[] ProcessHeaps);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessIdOfThread", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetProcessIdOfThread(HANDLE hThread);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessImageFileNameW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetProcessImageFileName([In] HANDLE hProcess, [Out] StringBuilder lpFileName, [In] uint nSize);

        /// <summary>
        /// Safe wrapper for the GetProcessImageFileName Win32 function that throws an exception on failure.
        /// </summary>
        public static string GetProcessImageFileName(HANDLE hProcess, int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            sb.Length = (int)GetProcessImageFileName(hProcess, sb, (uint)sb.Capacity);
            if (sb.Length == 0 && KERNEL32.GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();
            return sb.ToString();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessIoCounters", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetProcessIoCounters(
            [In] HANDLE hProcess,
            [Out] out IO_COUNTERS lpIoCounters);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetProcessTimes", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetProcessTimes(
            [In] HANDLE hProcess,
            [Out] out FILETIME lpCreationTime,
            [Out] out FILETIME lpExitTime,
            [Out] out FILETIME lpKernelTime,
            [Out] out FILETIME lpUserTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetQueuedCompletionStatus", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetQueuedCompletionStatus(
            [In] HANDLE CompletionPort,
            [Out] out uint lpNumberOfBytes,
            [Out] out UINT_PTR lpCompletionKey,
            [Out] out OVERLAPPED lpOverlapped,
            [In] uint dwMilliseconds);

        /// <summary>
        /// Windows Vista or later: retrieves mulitple completion statuses at one time.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetQueuedCompletionStatusEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetQueuedCompletionStatusEx(
            [In] HANDLE CompletionPort,
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] OVERLAPPED_ENTRY[] lpCompletionPortEntries,
            [In] uint ulCount,
            [Out] out uint ulNumEntriesRemoved,
            [In] uint dwMilliseconds,
            [In] bool fAlertable = false);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetShortPathNameW", CharSet = CharSet.Unicode)]
        public static extern uint GetShortPathName([In] string lpFileName, [Out] StringBuilder lpszShortPath, [In] uint cchBuffer);

        /// <summary>
        /// Safe wrapper for the GetShortPathName Win32 function.
        /// </summary>
        public static string GetShortPathName(string strFileName, int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            sb.Length = (int)GetShortPathName(strFileName, sb, (uint)sb.Capacity);
            return (sb.Length > 0) ? sb.ToString() : null;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetStartupInfoW", CharSet = CharSet.Unicode)]
        public static extern void GetStartupInfo([In, Out] STARTUPINFO lpStartupInfo);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetStdHandle", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE GetStdHandle([In] StandardHandles nStdHandle);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetSystemInfo", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern void GetSystemInfo([Out] out SYSTEM_INFO lpSystemInfo);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetSystemRegistryQuota", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetSystemRegistryQuota(
            [Out] out uint pdwQuotaAllowed,
            [Out] out uint pdwQuotaUsed);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetSystemTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetSystemTime([Out] out SYSTEMTIME theDateTime);

        /// <summary>
        /// This requires Windows Server 2003, or Windows XP SP-1.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetSystemTimes", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetSystemTimes(
            [Out] out FILETIME lpIdleTime,
            [Out] out FILETIME lpKernelTime,
            [Out] out FILETIME lpUserTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetTempPathW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetTempPath(
            [In] uint nBufferLength,
            [Out] StringBuilder lpBuffer);

        /// <summary>
        /// Safe override for the GetTempPath Win32 function that throws an exception if it encounters an error.
        /// </summary>
        public static string GetTempPath(int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            sb.Length = (int)GetTempPath((uint)sb.Capacity, sb);
            if (sb.Length == 0 && GetLastError() != Win32ErrorCode.ERROR_SUCCESS)
                throw new Win32Exception();
            return sb.ToString();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetThreadIdealProcessorEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetThreadIdealProcessorEx(
            [In] HANDLE hThread,
            [Out] out PROCESSOR_NUMBER lpIdealProcessor);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetThreadTimes", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetThreadTimes(
            [In] SafeThreadHandle hThread,
            [Out] out FILETIME pftCreationTime,
            [Out] out FILETIME pftExitTime,
            [Out] out FILETIME pftKernelTime,
            [Out] out FILETIME pftUserTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetTickCount", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint GetTickCount();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetTickCount64", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern ulong GetTickCount64();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GetVersionExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetVersionEx([In, Out] ref OSVERSIONINFOEX lpVersionInfo);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "GetWindowsDirectoryW", CharSet = CharSet.Unicode)]
        public static extern uint GetWindowsDirectory(
            [Out] StringBuilder sb,
            [In] uint uSize);

        /// <summary>
        /// Safe override for the GetWindowsDirectory Win32 function.
        /// </summary>
        public static string GetWindowsDirectory(int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            sb.Length = (int)GetWindowsDirectory(sb, (uint)sb.Capacity);
            return (sb.Length > 0) ? sb.ToString() : null;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GlobalFree", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HGLOBAL GlobalFree([In] HGLOBAL hMem);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GlobalFree", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HGLOBAL GlobalFree([In] UINT_PTR hMem);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GlobalLock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR GlobalLock([In] HGLOBAL hMem);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GlobalUnlock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GlobalUnlock([In] HGLOBAL hMem);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "GlobalMemoryStatusEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GlobalMemoryStatusEx([In, Out] ref MEMORYSTATUSEX lpBuffer);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapAlloc", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR HeapAlloc(
            [In] HANDLE hHeap,
            [In] HeapFlags dwFlags,
            [In] UINT_PTR dwBytes);

        /// <summary>
        /// Convenient wrapper for the HeapAlloc Win32 function that allocates memory from the default heap and throws an exception on failure.
        /// </summary>
        public static UINT_PTR HeapAlloc(long lBytes)
        {
            UINT_PTR ptr = HeapAlloc(GetProcessHeap(), HeapFlags.HEAP_ZERO_MEMORY, lBytes);
            if (ptr == UINT_PTR.Zero)
                throw new Win32Exception();
            return ptr;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapCompact", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR HeapCompact(
            [In] HANDLE hHeap,
            [In] HeapFlags dwFlags);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapCreate", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE HeapCreate(
            [In] HeapFlags dwFlags,
            [In] UINT_PTR dwInitialSize,
            [In] UINT_PTR dwMaximumSize);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapDestroy", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapDestroy([In] HANDLE hHeap);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapFree", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapFree(
            [In] HANDLE hHeap,
            [In] HeapFlags dwFlags,
            [In] UINT_PTR lpMem);

        /// <summary>
        /// Convenient wrapper for the HeapFree Win32 function that frees memory from the default heap and throws an exception on failure.
        /// </summary>
        public static void HeapFree(UINT_PTR lpMem)
        {
            if (!HeapFree(GetProcessHeap(), 0, lpMem))
                throw new Win32Exception();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapLock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapLock([In] HANDLE hHeap);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapQueryInformation", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapQueryInformation(
            [In] HANDLE HeapHandle,
            [In] HEAP_INFORMATION_CLASS HeapInformationClass,
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] HeapInformation,
            [In] UINT_PTR HeapInformationLength,
            [Out] out UINT_PTR ReturnLength);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapReAlloc", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR HeapReAlloc(
            [In] HANDLE hHeap,
            [In] HeapFlags dwFlags,
            [In] UINT_PTR lpMem,
            [In] UINT_PTR dwBytes);

        /// <summary>
        /// Convenient wrapper for the HeapReAlloc Win32 function that re-allocates memory from the default heap and throws an exception on failure.
        /// </summary>
        public static UINT_PTR HeapReAlloc(UINT_PTR lpMem, long lBytes)
        {
            UINT_PTR ptr = HeapReAlloc(GetProcessHeap(), 0, lpMem, lBytes);
            if (ptr == UINT_PTR.Zero)
                throw new Win32Exception();
            return ptr;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapSetInformation", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapSetInformation(
            [In] HANDLE HeapHandle,
            [In] HEAP_INFORMATION_CLASS HeapInformationClass,
            [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] HeapInformation,
            [In] UINT_PTR HeapInformationLength);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapSize", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR HeapSize(
            [In] HANDLE hHeap,
            [In] HeapFlags dwFlags,
            [In] UINT_PTR lpMem);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapUnlock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapUnlock([In] HANDLE hHeap);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapValidate", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapValidate(
            [In] HANDLE hHeap,
            [In] HeapFlags dwFlags,
            [In] UINT_PTR lpMem);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "HeapWalk", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool HeapWalk(
            [In] HANDLE hHeap,
            [In, Out] ref PROCESS_HEAP_ENTRY lpEntry);

        /// <param name="lpAttributeList">LPPROC_THREAD_ATTRIBUTE_LIST</param>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "InitializeProcThreadAttributeList", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool InitializeProcThreadAttributeList(
            [In] UINT_PTR lpAttributeList,
            [In] uint dwAttributeCount,
            [In] uint dwFlags,
            [In, Out] ref UINT_PTR lpSize);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "IsBadCodePtr", CharSet = CharSet.Unicode)]
        public static extern bool IsBadCodePtr(UINT_PTR lpfm);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "IsBadReadPtr", CharSet = CharSet.Unicode)]
        public static extern bool IsBadReadPtr(UINT_PTR lp, UINT_PTR ucb);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "IsBadStringPtrA", CharSet = CharSet.Ansi)]
        public static extern bool IsBadStringPtrA(UINT_PTR lpfm);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "IsBadStringPtrW", CharSet = CharSet.Unicode)]
        public static extern bool IsBadStringPtrW(UINT_PTR lpfm);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "IsBadWritePtr", CharSet = CharSet.Unicode)]
        public static extern bool IsBadWritePtr(UINT_PTR lp, UINT_PTR ucb);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "IsDebuggerPresent", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool IsDebuggerPresent();

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "IsProcessorFeaturePresent", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool IsProcessorFeaturePresent([In] ProcessorFeature ProcessorFeature);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "IsWow64Process", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool IsWow64Process([In] HANDLE hProcess, [Out] out bool Wow64Process);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "LCMapStringW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern int LCMapString(
            LCID Locale,
            LocaleMappingFlags dwMapFlags,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpSrcStr,
            [In] int cchSrc,
            [Out] StringBuilder lpDestStr,
            [In] int cchDest);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "LCMapStringEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern int LCMapStringEx(
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpLocaleName,
            [In] LocaleMappingFlags dwMapFlags,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpSrcStr,
            [In] int cchSrc,
            [Out] StringBuilder lpDestStr,
            [In] int cchDest,
            [In] ref NLSVERSIONINFO lpVersionInformation,
            [In] UINT_PTR lpReserved,
            [In] INT_PTR lParam);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "LoadLibraryW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HINSTANCE LoadLibrary([In] string lpFileName);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "LoadLibraryExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HINSTANCE LoadLibraryEx(
            [In] string lpFileName,
            [In] HANDLE hFile,
            [In] LoadLibraryExFlags dwFlags = 0);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "Module32FirstW", CharSet = CharSet.Unicode)]
        public static extern bool Module32First([In] HANDLE hSnapshot, [In, Out] ref MODULEENTRY32 lpme);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "Module32NextW", CharSet = CharSet.Unicode)]
        public static extern bool Module32Next([In] HANDLE hSnapshot, [In, Out] ref MODULEENTRY32 lpme);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "OpenEventW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE OpenEvent(
            [In] EventAccessRights dwDesiredAccess,
            [In, MarshalAs(UnmanagedType.Bool)] bool bInheritHandle,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpName);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "OpenFileById", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE OpenFileById(
            [In] HANDLE hFile,
            [In] ref FILE_ID_DESCRIPTOR lpFileID,
            [In] FileAccessRights dwDesiredAccess,
            [In] FileShareMode dwShareMode,
            [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes,
            [In] FileFlagsAndAttributes dwFlags);
        
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "OpenPrivateNamespaceW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE OpenPrivateNamespace(
            UINT_PTR lpBoundaryDescriptor,
            string lpAliasPrefix);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "OpenProcess", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE OpenProcess(ProcessAccessRights dwDesiredAccess, bool bInheritHandle, uint dwProcessId);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "OpenThread", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE OpenThread(ThreadAccessRights dwDesiredAccess, bool bInheritHandle, uint dwThreadId);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "OpenThreadToken", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool OpenThreadToken(HANDLE ThreadHandle, TokenAccessRights DesiredAccess, bool OpenAsSelf, out HANDLE TokenHandle);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "Process32First", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool Process32First([In]HANDLE hSnapshot, ref PROCESSENTRY32 lppe);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "Process32Next", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool Process32Next([In]HANDLE hSnapshot, ref PROCESSENTRY32 lppe);

        /// <summary>
        /// Retrieves the Remote Desktop Services session associated with a specified process.
        /// Callers must hold the PROCESS_QUERY_INFORMATION access right for the specified process.
        /// </summary>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ProcessIdToSessionId", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool ProcessIdToSessionId([In] uint dwProcessId, [Out] out uint pSessionId);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryFullProcessImageNameW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool QueryFullProcessImageName([In] HANDLE hProcess, QueryFullProcessImageNameFlags dwFlags, StringBuilder lpExeName, [In, Out] ref uint lpdwSize);

        /// <summary>
        /// Safe wrapper for the QueryFullProcessImageName Win32 function that throws an exception on failure.
        /// </summary>
        public static string QueryFullProcessImageName([In] HANDLE hProcess, QueryFullProcessImageNameFlags dwFlags = 0, int iTryBufferLength = Constants.MAX_PATH)
        {
            StringBuilder sb = new StringBuilder(iTryBufferLength);
            uint uiSize = (uint)sb.Capacity;
            if (!QueryFullProcessImageName(hProcess, dwFlags, sb, ref uiSize) || uiSize == 0)
                throw new Win32Exception();
            sb.Length = (int)uiSize;
            return sb.ToString();
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryPerformanceCounter", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryPerformanceCounter([Out] out LARGE_INTEGER lpFrequency);

        /// <summary>
        /// Convenient wrapper for the QueryPerformanceCounter Win32 function that throws an exception on failure.
        /// </summary>
        public static long QueryPerformanceCounter()
        {
            LARGE_INTEGER iCounter;
            if (!QueryPerformanceCounter(out iCounter))
                throw new Win32Exception();
            return iCounter.QuadPart;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryPerformanceFrequency", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryPerformanceFrequency([Out] out LARGE_INTEGER lpFrequency);

        /// <summary>
        /// Convenient wrapper for the QueryPerformanceFrequency Win32 function that throws an exception on failure.
        /// </summary>
        public static long QueryPerformanceFrequency()
        {
            LARGE_INTEGER iCounter;
            if (!QueryPerformanceFrequency(out iCounter))
                throw new Win32Exception();
            return iCounter.QuadPart;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryIdleProcessorCycleTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryIdleProcessorCycleTime([In, Out] ref ulong BufferLength, [Out, MarshalAs(UnmanagedType.LPArray)] ulong[] ProcessorIdleCycleTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryIdleProcessorCycleTimeEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryIdleProcessorCycleTimeEx(
            [In] ushort Group,
            [In, Out] ref ulong BufferLength,
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ulong[] ProcessorIdleCycleTime);

        /// <summary>
        /// Override that allows the caller to specify zero for the last parameter, in order to retrieve the necessary buffer size.
        /// </summary>
        /// <param name="Group"></param>
        /// <param name="BufferLength"></param>
        /// <param name="ProcessorIdleCycleTime"></param>
        /// <returns></returns>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryIdleProcessorCycleTimeEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryIdleProcessorCycleTimeEx(
            [In] ushort Group,
            [Out] out ulong BufferLength,
            [In] UINT_PTR ProcessorIdleCycleTime = default(UINT_PTR));

        /// <summary>
        /// Convenient wrapper for the QueryIdleProcessorCycleTimeEx Win32 function that throws an exception on failure.
        /// </summary>
        public static ulong[] QueryIdleProcessorCycleTimeEx(ushort Group = 0)
        {
            ulong ulBufferLength;

            if (!QueryIdleProcessorCycleTimeEx(Group, out ulBufferLength, 0))
                throw new Win32Exception();

            /// If the group number is invalid, the function still returns success but the buffer length is zero.
            /// We just throw the error before the next call inevitably throws the same one anyway.
            if (ulBufferLength == 0)
                throw new Win32Exception(Win32ErrorCode.ERROR_INVALID_PARAMETER);

            ulong[] cycleTimes = new ulong[ulBufferLength / sizeof(ulong)];

            if (!QueryIdleProcessorCycleTimeEx(Group, ref ulBufferLength, cycleTimes))
                throw new Win32Exception();

            return cycleTimes;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryProcessCycleTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryProcessCycleTime(
            [In] HANDLE ProcessHandle,
            [Out] out ulong CycleTime);

        /// <summary>
        /// Convenient wrapper for the QueryProcessCycleTime Win32 function that throws an exception on failure.
        /// </summary>
        public static ulong QueryProcessCycleTime(HANDLE hProcess)
        {
            ulong ulCounter;
            if (!QueryProcessCycleTime(hProcess, out ulCounter))
                throw new Win32Exception();
            return ulCounter;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryThreadCycleTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryThreadCycleTime(
            [In] HANDLE ThreadHandle,
            [Out] out ulong CycleTime);

        /// <summary>
        /// Convenient wrapper for the QueryThreadCycleTime Win32 function that throws an exception on failure.
        /// </summary>
        public static ulong QueryThreadCycleTime(HANDLE ThreadHandle)
        {
            ulong ulCounter;
            if (!QueryThreadCycleTime(ThreadHandle, out ulCounter))
                throw new Win32Exception();
            return ulCounter;
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "QueryUnbiasedInterruptTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool QueryUnbiasedInterruptTime([Out] out ulong UnbiasedTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ReadProcessMemory", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool ReadProcessMemory(
            [In] HANDLE hProcess,
            [In] UINT_PTR lpBaseAddress,
            [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] lpBuffer,
            [In] UINT_PTR nSize,
            [Out] out UINT_PTR lpNumberOfBytesRead);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "RemoveDirectoryW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool RemoveDirectory(string lpPathName);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "RemoveDirectoryTransactedW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool RemoveDirectoryTransacted([In] string lpPathName, [In] HANDLE hTransaction);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ReOpenFile", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern HANDLE ReOpenFile(
            [In] HANDLE hOriginalFile,
            [In] FileAccessRights dwDesiredAccess,
            [In] FileShareMode dwShareMode,
            [In] FileFlagsAndAttributes dwFlags);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ResetEvent", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool ResetEvent([In] HANDLE hEvent);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetComputerNameExW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetComputerNameEx(
            [In] COMPUTER_NAME_FORMAT NameType,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpBuffer);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetDllDirectoryW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetDllDirectory([In] string lpPathName = null);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetEndOfFile", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool SetEndOfFile(HANDLE hFile);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetEvent", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetEvent([In] HANDLE hEvent);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetFileAttributesW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool SetFileAttributes(
            string lpFileName,
            [In] FileFlagsAndAttributes dwFileAttributes);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetFilePointerEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool SetFilePointerEx(
            [In] HANDLE hFile,
            [In] LARGE_INTEGER liDistanceToMove,
            [Out] out LARGE_INTEGER lpNewFilePointer,
            [In] FilePointerMoveMethod dwMoveMethod);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetFileValidData", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetFileValidData(
            [In] HANDLE hFile,
            [In] long ValidDataLength);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetHandleInformation", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetHandleInformation([In] HANDLE hObject, [In] HandleInformationFlags dwMask, [In] HandleInformationFlags dwFlags);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetStdHandle", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetStdHandle([In] StandardHandles nStdHandle, [In] HANDLE hHandle);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetSystemTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetSystemTime(ref SYSTEMTIME theDateTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetThreadIdealProcessorEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetThreadIdealProcessorEx(
            [In] HANDLE hThread,
            [In] ref PROCESSOR_NUMBER lpIdealProcessor,
            [Out] out PROCESSOR_NUMBER lpPreviousIdealProcessor);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetProcessAffinityMask", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool SetProcessAffinityMask(
            HANDLE hProcess,
            UINT_PTR dwProcessAffinityMask);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SetThreadAffinityMask", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR SetThreadAffinityMask(
            HANDLE hThread,
            UINT_PTR dwThreadAffinityMask);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "ShowConsoleCursor", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern int ShowConsoleCursor (
            [In] HANDLE hConsoleOutput,
            [In, MarshalAs(UnmanagedType.Bool)] bool bShow);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "SystemTimeToFileTime", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SystemTimeToFileTime(
            [In] ref SYSTEMTIME lpSystemTime,
            [Out] out FILETIME lpFileTime);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "TerminateProcess", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool TerminateProcess(
            [In] HANDLE hProcess,
            [In] uint uExitCode);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "Thread32First", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool Thread32First([In]HANDLE hSnapshot, ref THREADENTRY32 lpte);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "Thread32Next", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern bool Thread32Next([In]HANDLE hSnapshot, ref THREADENTRY32 lpte);

        /// <param name="lpAttributeList">LPPROC_THREAD_ATTRIBUTE_LIST</param>
        /// <param name="Attribute"><see cref="ProcessThreadAttributes"/></param>
        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "UpdateProcThreadAttribute", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool UpdateProcThreadAttribute(
            [In] UINT_PTR lpAttributeList,
            [In] uint dwFlags,
            [In] UINT_PTR Attribute,
            [In] UINT_PTR lpValue,
            [In] UINT_PTR cbSize,
            /*[Out] out UINT_PTR lpPreviousValue*/[In] UINT_PTR lpPreviousValue = default(UINT_PTR),
            [In] UINT_PTR lpReturnSize = default(UINT_PTR));

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VerifyVersionInfoW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool VerifyVersionInfo(
            [In] ref OSVERSIONINFOEX lpVersionInfo,
            [In] uint dwTypeMask,
            [In] ulong dwlConditionMask);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VerifyVersionInfoW", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern ulong VerSetConditionMask(
            [In] ulong dwlConditionMask,
            [In] OSVersionTypeMask dwTypeBitMask,
            [In] OSVersionConditionMask dwConditionMask);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualAlloc", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR VirtualAlloc(
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize,
            [In] MemoryFlags flAllocationType,
            [In] MemoryFlags flProtect);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualAllocEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR VirtualAllocEx(
            [In] HANDLE hProcess,
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize,
            [In] MemoryFlags flAllocationType,
            [In] MemoryFlags flProtect);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualFree", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool VirtualFree(
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize,
            [In] MemoryFlags flFreeType);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualFreeEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool VirtualFreeEx(
            [In] HANDLE hProcess,
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize,
            [In] MemoryFlags flFreeType);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualLock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool VirtualLock(
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualProtect", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool VirtualProtect(
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize,
            [In] MemoryFlags flNewProtect,
            [Out] out MemoryFlags flOldProtect);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualProtectEx", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool VirtualProtectEx(
            [In] HANDLE hProcess,
            [In] UINT_PTR lpAddress,
            [In] UINT_PTR dwSize,
            [In] MemoryFlags flNewProtect,
            [Out] out MemoryFlags flOldProtect);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "VirtualQuery", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern UINT_PTR VirtualQuery(
            [In] UINT_PTR lpAddress,
            [Out] out MEMORY_BASIC_INFORMATION lpBuffer,
            [In] UINT_PTR dwLength);

        /// <summary>
        /// Simplified wrapper for the Win32 VirtualQuery function.
        /// </summary>
        public static bool VirtualQuery(UINT_PTR lpAddress, out MEMORY_BASIC_INFORMATION lpBuffer)
        {
            UINT_PTR uiSize = MarshalHelper.SizeOf<MEMORY_BASIC_INFORMATION>();
            return (uiSize == VirtualQuery(lpAddress, out lpBuffer, uiSize));
        }

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "VirtualQueryEx", CharSet = CharSet.Unicode)]
        public static extern UINT_PTR VirtualQueryEx(
            [In] HANDLE hProcess,
            [In] UINT_PTR lpAddress,
            [Out] out MEMORY_BASIC_INFORMATION lpBuffer,
            [In] UINT_PTR dwLength);

        /// <summary>
        /// Simplified wrapper for the Win32 VirtualQueryEx function.
        /// </summary>
        public static bool VirtualQueryEx(HANDLE hProcess, UINT_PTR lpAddress, out MEMORY_BASIC_INFORMATION lpBuffer)
        {
            UINT_PTR uiSize = MarshalHelper.SizeOf<MEMORY_BASIC_INFORMATION>();
            return (uiSize == VirtualQueryEx(hProcess, lpAddress, out lpBuffer, uiSize));
        }

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "WaitForSingleObject", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
        public static extern uint WaitForSingleObject(
            [In] HANDLE hHandle,
            [In] uint dwMilliseconds = 0);

        [DllImport(Constants.ModuleNames.KERNEL32, SetLastError = true, EntryPoint = "WriteProcessMemory", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool WriteProcessMemory(
            [In] HANDLE hProcess,
            [In] UINT_PTR lpBaseAddress,
            [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] lpBuffer,
            [In] UINT_PTR nSize,
            [Out] out UINT_PTR lpNumberOfBytesWritten);

        [DllImport(Constants.ModuleNames.KERNEL32, EntryPoint = "WTSGetActiveConsoleSessionId")]
        public static extern int WTSGetActiveConsoleSessionId();
    }
}

/************************************************************************************
          1    0          AcquireSRWLockExclusive (forwarded to NTDLL.RtlAcquireSRWLockExclusive)
          2    1          AcquireSRWLockShared (forwarded to NTDLL.RtlAcquireSRWLockShared)
          3    2 000042F0 ActivateActCtx
          4    3 00066960 AddAtomA
          5    4 00066900 AddAtomW
          6    5 0006ABD0 AddConsoleAliasA
          7    6 0006AC40 AddConsoleAliasW
          8    7 0004B2B0 AddIntegrityLabelToBoundaryDescriptor
          9    8 000957F0 AddLocalAlternateComputerNameA
         10    9 0008FCC0 AddLocalAlternateComputerNameW
         11    A 00048710 AddRefActCtx
         12    B 0004B2E0 AddSIDToBoundaryDescriptor
         13    C 0004E280 AddSecureMemoryCacheCallback
         14    D          AddVectoredContinueHandler (forwarded to NTDLL.RtlAddVectoredContinueHandler)
         15    E          AddVectoredExceptionHandler (forwarded to NTDLL.RtlAddVectoredExceptionHandler)
         16    F 00096E60 AdjustCalendarDate
         17   10 00085AA0 AllocConsole
         18   11 00047C10 AllocateUserPhysicalPages
         19   12 0005AFE0 AllocateUserPhysicalPagesNuma
         20   13 0007F430 ApplicationRecoveryFinished
         21   14 00087170 ApplicationRecoveryInProgress
         22   15 0004C5D0 AreFileApisANSI
         23   16 0000A4A0 AssignProcessToJobObject
         24   17 000859B0 AttachConsole
         25   18 00090140 BackupRead
         26   19 00077CF0 BackupSeek
         27   1A 0008FE40 BackupWrite
         28   1B 00087230 BaseCheckAppcompatCache
         29   1C 00087180 BaseCheckAppcompatCacheEx
         30   1D 00005D60 BaseCheckRunApp
         31   1E 00048480 BaseCleanupAppcompatCacheSupport
         32   1F 00006CC0 BaseDllReadWriteIniFile
         33   20 00048340 BaseDumpAppcompatCache
         34   21 0006F870 BaseFlushAppcompatCache
         35   22 00002710 BaseFormatObjectAttributes
         36   23 00042B00 BaseFormatTimeOut
         37   24 0006F800 BaseGenerateAppCompatData
         38   25 00056DE0 BaseGetNamedObjectDirectory
         39   26 0006FA10 BaseInitAppcompatCacheSupport
         40   27 0001DE30 BaseIsAppcompatInfrastructureDisabled
         41   28 000872F0 BaseQueryModuleData
         42   29 00023090 BaseSetLastNTError
         43   2A 00016520 BaseThreadInitThunk
         44   2B 0005B2C0 BaseUpdateAppcompatCache
         45   2C 00042A40 BaseVerifyUnicodeString
         46   2D 000171C0 Basep8BitStringToDynamicUnicodeString
         47   2E 00056C70 BasepAllocateActivationContextActivationBlock
         48   2F 00042AA0 BasepAnsiStringToDynamicUnicodeString
         49   30 00088E90 BasepCheckAppCompat
         50   31 0001FC20 BasepCheckBadapp
         51   32 0001DD80 BasepCheckWinSaferRestrictions
         52   33 00056C20 BasepFreeActivationContextActivationBlock
         53   34 0005B2E0 BasepFreeAppCompatData
         54   35 000046B0 BasepMapModuleHandle
         55   36 00067880 Beep
         56   37 0008E420 BeginUpdateResourceA
         57   38 00086EE0 BeginUpdateResourceW
         58   39 00047A30 BindIoCompletionCallback
         59   3A 00070650 BuildCommDCBA
         60   3B 000706F0 BuildCommDCBAndTimeoutsA
         61   3C 00070720 BuildCommDCBAndTimeoutsW
         62   3D 00070680 BuildCommDCBW
         63   3E 000629D0 CallNamedPipeA
         64   3F 00062820 CallNamedPipeW
         65   40 0000A520 CallbackMayRunLong
         66   41 0004CD30 CancelDeviceWakeupRequest
         67   42 00050000 CancelIo
         68   43 0004C5C0 CancelIoEx
         69   44 00050030 CancelSynchronousIo
         70   45          CancelThreadpoolIo (forwarded to NTDLL.TpCancelAsyncIoOperation)
         71   46 00047980 CancelTimerQueueTimer
         72   47 00008030 CancelWaitableTimer
         73   48 00008900 ChangeTimerQueueTimer
         74   49 000974A0 CheckElevation
         75   4A 00050690 CheckElevationEnabled
         76   4B 0004B430 CheckForReadOnlyResource
         77   4C 00061A60 CheckNameLegalDOS8Dot3A
         78   4D 0004CEF0 CheckNameLegalDOS8Dot3W
         79   4E 00050E40 CheckRemoteDebuggerPresent
         80   4F 0004A5F0 ClearCommBreak
         81   50 0004A450 ClearCommError
         82   51 00041E40 CloseConsoleHandle
         83   52 00022F80 CloseHandle
         84   53 00072E20 ClosePrivateNamespace
         85   54 000443A0 CloseProfileUserMapping
         86   55          CloseThreadpool (forwarded to NTDLL.TpReleasePool)
         87   56          CloseThreadpoolCleanupGroup (forwarded to NTDLL.TpReleaseCleanupGroup)
         88   57          CloseThreadpoolCleanupGroupMembers (forwarded to NTDLL.TpReleaseCleanupGroupMembers)
         89   58          CloseThreadpoolIo (forwarded to NTDLL.TpReleaseIoCompletion)
         90   59          CloseThreadpoolTimer (forwarded to NTDLL.TpReleaseTimer)
         91   5A          CloseThreadpoolWait (forwarded to NTDLL.TpReleaseWait)
         92   5B          CloseThreadpoolWork (forwarded to NTDLL.TpReleaseWork)
         93   5C 0000B2B0 CmdBatNotification
         94   5D 00087DA0 CommConfigDialogA
         95   5E 0007FC60 CommConfigDialogW
         96   5F 00096A60 CompareCalendarDates
         97   60 0001BD20 CompareFileTime
         98   61 00011300 CompareStringA
         99   62 0004B980 CompareStringEx
        100   63 0001D720 CompareStringOrdinal
        101   64 00015A10 CompareStringW
        102   65 000020D0 ConnectNamedPipe
        103   66 00041B50 ConsoleMenuControl
        104   67 00077750 ContinueDebugEvent
        105   68 00096B10 ConvertCalDateTimeToSystemTime
        106   69 0001B590 ConvertDefaultLocale
        107   6A 00008B10 ConvertFiberToThread
        108   6B 00046BA0 ConvertNLSDayOfWeekToWin32DayOfWeek
        109   6C 00090D60 ConvertSystemTimeToCalDateTime
        110   6D 00008C10 ConvertThreadToFiber
        111   6E 00008C20 ConvertThreadToFiberEx
        112   6F 00047710 CopyContext
        113   70 00095620 CopyFileA
        114   71 000953D0 CopyFileExA
        115   72 000123D0 CopyFileExW
        116   73 00095550 CopyFileTransactedA
        117   74 00095480 CopyFileTransactedW
        118   75 000092D0 CopyFileW
        119   76 0008FA70 CopyLZFile
        120   77 0006FAD0 CreateActCtxA
        121   78 0001ACD0 CreateActCtxW
        122   79 00060E40 CreateBoundaryDescriptorA
        123   7A 0004B310 CreateBoundaryDescriptorW
        124   7B 00040FF0 CreateConsoleScreenBuffer
        125   7C 0004C5B0 CreateDirectoryA
        126   7D 0008A0C0 CreateDirectoryExA
        127   7E 00089180 CreateDirectoryExW
        128   7F 0008A210 CreateDirectoryTransactedA
        129   80 0008A140 CreateDirectoryTransactedW
        130   81 0000AD70 CreateDirectoryW
        131   82 00011120 CreateEventA
        132   83 0004C5A0 CreateEventExA
        133   84 0004C590 CreateEventExW
        134   85 00015290 CreateEventW
        135   86 00008D40 CreateFiber
        136   87 00008D70 CreateFiberEx
        137   88 000231F0 CreateFileA
        138   89 0000EAD0 CreateFileMappingA
        139   8A 00065000 CreateFileMappingNumaA
        140   8B 0004C550 CreateFileMappingNumaW
        141   8C 0000F9F0 CreateFileMappingW
        142   8D 00075A10 CreateFileTransactedA
        143   8E 00075870 CreateFileTransactedW
        144   8F 00011870 CreateFileW
        145   90 0005B9D0 CreateHardLinkA
        146   91 0005BB30 CreateHardLinkTransactedA
        147   92 0005BA70 CreateHardLinkTransactedW
        148   93 0005B6D0 CreateHardLinkW
        149   94 00005650 CreateIoCompletionPort
        150   95 0005BF20 CreateJobObjectA
        151   96 0005BE90 CreateJobObjectW
        152   97 00048720 CreateJobSet
        153   98 00006A20 CreateMailslotA
        154   99 00006A90 CreateMailslotW
        155   9A 00047AD0 CreateMemoryResourceNotification
        156   9B 00017210 CreateMutexA
        157   9C 0004C540 CreateMutexExA
        158   9D 0004C530 CreateMutexExW
        159   9E 000113C0 CreateMutexW
        160   9F 00062BA0 CreateNamedPipeA
        161   A0 00002540 CreateNamedPipeW
        162   A1 00004A10 CreatePipe
        163   A2 0007FE50 CreatePrivateNamespaceA
        164   A3 00072F40 CreatePrivateNamespaceW
        165   A4 00098840 CreateProcessA
        166   A5 0000A420 CreateProcessAsUserW
        167   A6 00097B70 CreateProcessInternalA
        168   A7 0001E7B0 CreateProcessInternalW
        169   A8 00021BB0 CreateProcessW
        170   A9 0004C4F0 CreateRemoteThread
        171   AA          CreateRemoteThreadEx (forwarded to api-ms-win-core-processthreads-l1-1-0.CreateRemoteThreadEx)
        172   AB 0000EB80 CreateSemaphoreA
        173   AC 0000EBB0 CreateSemaphoreExA
        174   AD 0004C4C0 CreateSemaphoreExW
        175   AE 00009820 CreateSemaphoreW
        176   AF 00075F30 CreateSymbolicLinkA
        177   B0 00076090 CreateSymbolicLinkTransactedA
        178   B1 00075FD0 CreateSymbolicLinkTransactedW
        179   B2 00075AD0 CreateSymbolicLinkW
        180   B3 0008E5D0 CreateTapePartition
        181   B4 00016580 CreateThread
        182   B5 0004BA90 CreateThreadpool
        183   B6 00006600 CreateThreadpoolCleanupGroup
        184   B7 00073020 CreateThreadpoolIo
        185   B8 00008820 CreateThreadpoolTimer
        186   B9 0004BA80 CreateThreadpoolWait
        187   BA 00006650 CreateThreadpoolWork
        188   BB 0004C4B0 CreateTimerQueue
        189   BC 00008AD0 CreateTimerQueueTimer
        190   BD 000021E0 CreateToolhelp32Snapshot
        191   BE 00049080 CreateUmsCompletionList
        192   BF 00048E50 CreateUmsThreadContext
        193   C0 00060DA0 CreateWaitableTimerA
        194   C1 00060D10 CreateWaitableTimerExA
        195   C2 0004C4A0 CreateWaitableTimerExW
        196   C3 0004B280 CreateWaitableTimerW
        197   C4 00054640 CtrlRoutine
        198   C5 000042B0 DeactivateActCtx
        199   C6 00066A80 DebugActiveProcess
        200   C7 000776F0 DebugActiveProcessStop
        201   C8 0004C490 DebugBreak
        202   C9 00050D90 DebugBreakProcess
        203   CA 00050D30 DebugSetProcessKillOnExit
        204   CB          DecodePointer (forwarded to NTDLL.RtlDecodePointer)
        205   CC          DecodeSystemPointer (forwarded to NTDLL.RtlDecodeSystemPointer)
        206   CD 000658B0 DefineDosDeviceA
        207   CE 0004C480 DefineDosDeviceW
        208   CF 00058920 DelayLoadFailureHook
        209   D0 00066950 DeleteAtom
        210   D1          DeleteBoundaryDescriptor (forwarded to NTDLL.RtlDeleteBoundaryDescriptor)
        211   D2          DeleteCriticalSection (forwarded to NTDLL.RtlDeleteCriticalSection)
        212   D3 00008B80 DeleteFiber
        213   D4 000114E0 DeleteFileA
        214   D5 00064F00 DeleteFileTransactedA
        215   D6 0004FC00 DeleteFileTransactedW
        216   D7 0000AD90 DeleteFileW
        217   D8          DeleteProcThreadAttributeList (forwarded to api-ms-win-core-processthreads-l1-1-0.DeleteProcThreadAttributeList)
        218   D9 000479B0 DeleteTimerQueue
        219   DA 0004C470 DeleteTimerQueueEx
        220   DB 00009030 DeleteTimerQueueTimer
        221   DC 00048F80 DeleteUmsCompletionList
        222   DD 00048E80 DeleteUmsThreadContext
        223   DE 00070790 DeleteVolumeMountPointA
        224   DF 000730C0 DeleteVolumeMountPointW
        225   E0 00049040 DequeueUmsCompletionListItems
        226   E1 000167C0 DeviceIoControl
        227   E2 00016780 DisableThreadLibraryCalls
        228   E3 00047430 DisableThreadProfiling
        229   E4          DisassociateCurrentThreadFromCallback (forwarded to NTDLL.TpDisassociateCallback)
        230   E5 0004C460 DisconnectNamedPipe
        231   E6 000514A0 DnsHostnameToComputerNameA
        232   E7 000091F0 DnsHostnameToComputerNameW
        233   E8 000510E0 DosDateTimeToFileTime
        234   E9 000613F0 DosPathToSessionPathA
        235   EA 00061270 DosPathToSessionPathW
        236   EB 00041DA0 DuplicateConsoleHandle
        237   EC 00015D10 DuplicateHandle
        238   ED 00047460 EnableThreadProfiling
        239   EE          EncodePointer (forwarded to NTDLL.RtlEncodePointer)
        240   EF          EncodeSystemPointer (forwarded to NTDLL.RtlEncodeSystemPointer)
        241   F0 00096000 EndUpdateResourceA
        242   F1 00095DC0 EndUpdateResourceW
        243   F2          EnterCriticalSection (forwarded to NTDLL.RtlEnterCriticalSection)
        244   F3 00048E20 EnterUmsSchedulingMode
        245   F4 00046A30 EnumCalendarInfoA
        246   F5 000469A0 EnumCalendarInfoExA
        247   F6 0004B950 EnumCalendarInfoExEx
        248   F7 0004C450 EnumCalendarInfoExW
        249   F8 0004C440 EnumCalendarInfoW
        250   F9 000468D0 EnumDateFormatsA
        251   FA 00046870 EnumDateFormatsExA
        252   FB 0004B940 EnumDateFormatsExEx
        253   FC 0004C430 EnumDateFormatsExW
        254   FD 0004C420 EnumDateFormatsW
        255   FE 00046820 EnumLanguageGroupLocalesA
        256   FF 0004C410 EnumLanguageGroupLocalesW
        257  100 00088320 EnumResourceLanguagesA
        258  101 0007FF40 EnumResourceLanguagesExA
        259  102 00080010 EnumResourceLanguagesExW
        260  103 00088350 EnumResourceLanguagesW
        261  104 00088380 EnumResourceNamesA
        262  105 00080050 EnumResourceNamesExA
        263  106 0001B6A0 EnumResourceNamesExW
        264  107 000883B0 EnumResourceNamesW
        265  108 000883E0 EnumResourceTypesA
        266  109 000800E0 EnumResourceTypesExA
        267  10A 00080110 EnumResourceTypesExW
        268  10B 00088410 EnumResourceTypesW
        269  10C 00046800 EnumSystemCodePagesA
        270  10D 0004C400 EnumSystemCodePagesW
        271  10E 00063770 EnumSystemFirmwareTables
        272  10F 0005A020 EnumSystemGeoID
        273  110 00046840 EnumSystemLanguageGroupsA
        274  111 0004C3F0 EnumSystemLanguageGroupsW
        275  112 0004C3E0 EnumSystemLocalesA
        276  113 0004C3D0 EnumSystemLocalesEx
        277  114 0004C3C0 EnumSystemLocalesW
        278  115 00046930 EnumTimeFormatsA
        279  116 0004B930 EnumTimeFormatsEx
        280  117 0004C3B0 EnumTimeFormatsW
        281  118 00046810 EnumUILanguagesA
        282  119 0004C3A0 EnumUILanguagesW
        283  11A 0008FA80 EnumerateLocalComputerNamesA
        284  11B 0008A2C0 EnumerateLocalComputerNamesW
        285  11C 0008E610 EraseTape
        286  11D 0004A1F0 EscapeCommFunction
        287  11E 00048FE0 ExecuteUmsThread
        288  11F          ExitProcess (forwarded to NTDLL.RtlExitUserProcess)
        289  120          ExitThread (forwarded to NTDLL.RtlExitUserThread)
        290  121 0005E350 ExitVDM
        291  122 000080A0 ExpandEnvironmentStringsA
        292  123 000171B0 ExpandEnvironmentStringsW
        293  124 0006AAD0 ExpungeConsoleCommandHistoryA
        294  125 0006AAE0 ExpungeConsoleCommandHistoryW
        295  126 0004BA00 FatalAppExitA
        296  127 0004B9F0 FatalAppExitW
        297  128 0004CCB0 FatalExit
        298  129 00051190 FileTimeToDosDateTime
        299  12A 0000B210 FileTimeToLocalFileTime
        300  12B 0000AF20 FileTimeToSystemTime
        301  12C 000548F0 FillConsoleOutputAttribute
        302  12D 00054950 FillConsoleOutputCharacterA
        303  12E 00054920 FillConsoleOutputCharacterW
        304  12F 000152B0 FindActCtxSectionGuid
        305  130 0006FA30 FindActCtxSectionStringA
        306  131 00021CE0 FindActCtxSectionStringW
        307  132 00003C80 FindAtomA
        308  133 0001B3C0 FindAtomW
        309  134 0001BD60 FindClose
        310  135 0004C390 FindCloseChangeNotification
        311  136 0004C340 FindFirstChangeNotificationA
        312  137 00002E30 FindFirstChangeNotificationW
        313  138 0004C380 FindFirstFileA
        314  139 0004C350 FindFirstFileExA
        315  13A 0001C4E0 FindFirstFileExW
        316  13B 00076650 FindFirstFileNameTransactedW
        317  13C 00076250 FindFirstFileNameW
        318  13D 00050290 FindFirstFileTransactedA
        319  13E 000501C0 FindFirstFileTransactedW
        320  13F 0001BD80 FindFirstFileW
        321  140 00076B00 FindFirstStreamTransactedW
        322  141 00076710 FindFirstStreamW
        323  142 0005D1F0 FindFirstVolumeA
        324  143 00070DE0 FindFirstVolumeMountPointA
        325  144 00070BA0 FindFirstVolumeMountPointW
        326  145 00061260 FindFirstVolumeW
        327  146 0004C2D0 FindNLSString
        328  147 0004B8D0 FindNLSStringEx
        329  148 0004C330 FindNextChangeNotification
        330  149 0004C320 FindNextFileA
        331  14A 00076180 FindNextFileNameW
        332  14B 00011910 FindNextFileW
        333  14C 00050130 FindNextStreamW
        334  14D 0005D060 FindNextVolumeA
        335  14E 00070A10 FindNextVolumeMountPointA
        336  14F 00070A00 FindNextVolumeMountPointW
        337  150 0004C310 FindNextVolumeW
        338  151 00004A30 FindResourceA
        339  152 00004A50 FindResourceExA
        340  153 00019940 FindResourceExW
        341  154 00019B50 FindResourceW
        342  155 0004C2A0 FindStringOrdinal
        343  156 00061250 FindVolumeClose
        344  157 0005C8D0 FindVolumeMountPointClose
        345  158 00017190 FlsAlloc
        346  159 000115B0 FlsFree
        347  15A 00023520 FlsGetValue
        348  15B 0001BD90 FlsSetValue
        349  15C 0000B510 FlushConsoleInputBuffer
        350  15D 000069F0 FlushFileBuffers
        351  15E 000033E0 FlushInstructionCache
        352  15F          FlushProcessWriteBuffers (forwarded to NTDLL.NtFlushProcessWriteBuffers)
        353  160 0004C290 FlushViewOfFile
        354  161 0006E770 FoldStringA
        355  162 0004C270 FoldStringW
        356  163 0004C230 FormatMessageA
        357  164 00013840 FormatMessageW
        358  165 0006A970 FreeConsole
        359  166 0004C220 FreeEnvironmentStringsA
        360  167 00016D20 FreeEnvironmentStringsW
        361  168 00016620 FreeLibrary
        362  169 00005580 FreeLibraryAndExitThread
        363  16A          FreeLibraryWhenCallbackReturns (forwarded to NTDLL.TpCallbackUnloadDllOnCompletion)
        364  16B 00005BE0 FreeResource
        365  16C 00047BE0 FreeUserPhysicalPages
        366  16D 00040A80 GenerateConsoleCtrlEvent
        367  16E 00016F90 GetACP
        368  16F 000039A0 GetActiveProcessorCount
        369  170 00073180 GetActiveProcessorGroupCount
        370  171 0007F450 GetApplicationRecoveryCallback
        371  172 0007F440 GetApplicationRestartSettings
        372  173 00066920 GetAtomNameA
        373  174 000668D0 GetAtomNameW
        374  175 0005F1B0 GetBinaryType
        375  176 0005F1B0 GetBinaryTypeA
        376  177 0005EE10 GetBinaryTypeW
        377  178 00016CE0 GetCPInfo
        378  179 0005A280 GetCPInfoExA
        379  17A 0004C210 GetCPInfoExW
        380  17B 00096BC0 GetCalendarDateFormat
        381  17C 00096660 GetCalendarDateFormatEx
        382  17D 00086BD0 GetCalendarDaysInMonth
        383  17E 00096960 GetCalendarDifferenceInDays
        384  17F 0005A330 GetCalendarInfoA
        385  180 00033708 GetCalendarInfoEx
        386  181 00033714 GetCalendarInfoW
        387  182 0007E740 GetCalendarMonthsInYear
        388  183 0006F2E0 GetCalendarSupportedDateRange
        389  184 000972B0 GetCalendarWeekNumber
        390  185 000484B0 GetComPlusPackageInstallStatus
        391  186 00049F90 GetCommConfig
        392  187 00049EB0 GetCommMask
        393  188 00049DD0 GetCommModemStatus
        394  189 00049CD0 GetCommProperties
        395  18A 00049940 GetCommState
        396  18B 00049830 GetCommTimeouts
        397  18C 00021E70 GetCommandLineA
        398  18D 0001C480 GetCommandLineW
        399  18E 00064A20 GetCompressedFileSizeA
        400  18F 00064B10 GetCompressedFileSizeTransactedA
        401  190 00064A70 GetCompressedFileSizeTransactedW
        402  191 00064860 GetCompressedFileSizeW
        403  192 0000EC70 GetComputerNameA
        404  193 00005530 GetComputerNameExA
        405  194 0000CB50 GetComputerNameExW
        406  195 0000D130 GetComputerNameW
        407  196 0006AB30 GetConsoleAliasA
        408  197 00055A10 GetConsoleAliasExesA
        409  198 00055BD0 GetConsoleAliasExesLengthA
        410  199 00055BE0 GetConsoleAliasExesLengthW
        411  19A 00055A20 GetConsoleAliasExesW
        412  19B 0006AB80 GetConsoleAliasW
        413  19C 0006AAF0 GetConsoleAliasesA
        414  19D 0006AB10 GetConsoleAliasesLengthA
        415  19E 0006AB20 GetConsoleAliasesLengthW
        416  19F 0006AB00 GetConsoleAliasesW
        417  1A0 000405F0 GetConsoleCP
        418  1A1 000400F0 GetConsoleCharType
        419  1A2 0006AA70 GetConsoleCommandHistoryA
        420  1A3 0006AA90 GetConsoleCommandHistoryLengthA
        421  1A4 0006AAA0 GetConsoleCommandHistoryLengthW
        422  1A5 0006AA80 GetConsoleCommandHistoryW
        423  1A6 00040C90 GetConsoleCursorInfo
        424  1A7 0003FFE0 GetConsoleCursorMode
        425  1A8 00041850 GetConsoleDisplayMode
        426  1A9 0006A210 GetConsoleFontInfo
        427  1AA 00040B10 GetConsoleFontSize
        428  1AB 00041940 GetConsoleHardwareState
        429  1AC 00040300 GetConsoleHistoryInfo
        430  1AD 00042180 GetConsoleInputExeNameA
        431  1AE 000420E0 GetConsoleInputExeNameW
        432  1AF 00041F30 GetConsoleInputWaitHandle
        433  1B0 00069FC0 GetConsoleKeyboardLayoutNameA
        434  1B1 00069FA0 GetConsoleKeyboardLayoutNameW
        435  1B2 00022E60 GetConsoleMode
        436  1B3 000401F0 GetConsoleNlsMode
        437  1B4 0006AA50 GetConsoleOriginalTitleA
        438  1B5 0006AA30 GetConsoleOriginalTitleW
        439  1B6 00019780 GetConsoleOutputCP
        440  1B7 000403A0 GetConsoleProcessList
        441  1B8 00013AA0 GetConsoleScreenBufferInfo
        442  1B9 00013B00 GetConsoleScreenBufferInfoEx
        443  1BA 00040C10 GetConsoleSelectionInfo
        444  1BB 0006AA10 GetConsoleTitleA
        445  1BC 0001C7F0 GetConsoleTitleW
        446  1BD 000404A0 GetConsoleWindow
        447  1BE 0006E9E0 GetCurrencyFormatA
        448  1BF 0004B8A0 GetCurrencyFormatEx
        449  1C0 0004C1E0 GetCurrencyFormatW
        450  1C1 00048690 GetCurrentActCtx
        451  1C2 0006A1A0 GetCurrentConsoleFont
        452  1C3 0006A0E0 GetCurrentConsoleFontEx
        453  1C4 0000EC50 GetCurrentDirectoryA
        454  1C5 0001C580 GetCurrentDirectoryW
        455  1C6 00015CF0 GetCurrentProcess
        456  1C7 00015A50 GetCurrentProcessId
        457  1C8          GetCurrentProcessorNumber (forwarded to NTDLL.RtlGetCurrentProcessorNumber)
        458  1C9          GetCurrentProcessorNumberEx (forwarded to NTDLL.RtlGetCurrentProcessorNumberEx)
        459  1CA 00013F20 GetCurrentThread
        460  1CB 00013EE0 GetCurrentThreadId
        461  1CC 00048F50 GetCurrentUmsThread
        462  1CD 00090A60 GetDateFormatA
        463  1CE 00090920 GetDateFormatEx
        464  1CF 0000BE40 GetDateFormatW
        465  1D0 00087D00 GetDefaultCommConfigA
        466  1D1 0007FAD0 GetDefaultCommConfigW
        467  1D2 0004CD70 GetDevicePowerState
        468  1D3 0004C140 GetDiskFreeSpaceA
        469  1D4 0004C130 GetDiskFreeSpaceExA
        470  1D5 0000B7C0 GetDiskFreeSpaceExW
        471  1D6 0004C110 GetDiskFreeSpaceW
        472  1D7 000632E0 GetDllDirectoryA
        473  1D8 0004D800 GetDllDirectoryW
        474  1D9 0004C100 GetDriveTypeA
        475  1DA 0001BDF0 GetDriveTypeW
        476  1DB 0007E660 GetDurationFormat
        477  1DC 0006DE40 GetDurationFormatEx
        478  1DD 0000CD90 GetDynamicTimeZoneInformation
        479  1DE 000476E0 GetEnabledXStateFeatures
        480  1DF 0004C0F0 GetEnvironmentStrings
        481  1E0 00033840 GetEnvironmentStringsA
        482  1E1 00016D00 GetEnvironmentStringsW
        483  1E2 000164C0 GetEnvironmentVariableA
        484  1E3 000190A0 GetEnvironmentVariableW
        485  1E4 0004B890 GetEraNameCountedString
        486  1E5 0004C0E0 GetErrorMode
        487  1E6 000112B0 GetExitCodeProcess
        488  1E7 00011130 GetExitCodeThread
        489  1E8 000880B0 GetExpandedNameA
        490  1E9 0008E990 GetExpandedNameW
        491  1EA 000113E0 GetFileAttributesA
        492  1EB 0004C0D0 GetFileAttributesExA
        493  1EC 0000B7A0 GetFileAttributesExW
        494  1ED 00064F50 GetFileAttributesTransactedA
        495  1EE 0004FC90 GetFileAttributesTransactedW
        496  1EF 0001BDD0 GetFileAttributesW
        497  1F0 0004FDF0 GetFileBandwidthReservation
        498  1F1 000101F0 GetFileInformationByHandle
        499  1F2 00011E50 GetFileInformationByHandleEx
        500  1F3 0004B880 GetFileMUIInfo
        501  1F4 0004B840 GetFileMUIPath
        502  1F5 0000F9D0 GetFileSize
        503  1F6 00009B30 GetFileSizeEx
        504  1F7 00004F80 GetFileTime
        505  1F8 00022E00 GetFileType
        506  1F9 0004B830 GetFinalPathNameByHandleA
        507  1FA 0000A550 GetFinalPathNameByHandleW
        508  1FB 0004EB20 GetFirmwareEnvironmentVariableA
        509  1FC 0004EA60 GetFirmwareEnvironmentVariableW
        510  1FD 00023670 GetFullPathNameA
        511  1FE 000513E0 GetFullPathNameTransactedA
        512  1FF 00051320 GetFullPathNameTransactedW
        513  200 000176E0 GetFullPathNameW
        514  201 0006E6A0 GetGeoInfoA
        515  202 0006E2C0 GetGeoInfoW
        516  203 00073040 GetHandleInformation
        517  204 00047B70 GetLargePageMinimum
        518  205 00040E00 GetLargestConsoleWindowSize
        519  206 00022DD0 GetLastError
        520  207 0000B990 GetLocalTime
        521  208 00010210 GetLocaleInfoA
        522  209 00003C10 GetLocaleInfoEx
        523  20A 00019430 GetLocaleInfoW
        524  20B 00061B00 GetLogicalDriveStringsA
        525  20C 0004C0C0 GetLogicalDriveStringsW
        526  20D 0000B930 GetLogicalDrives
        527  20E 0004B820 GetLogicalProcessorInformation
        528  20F          GetLogicalProcessorInformationEx (forwarded to api-ms-win-core-sysinfo-l1-1-0.GetLogicalProcessorInformationEx)
        529  210 00073030 GetLongPathNameA
        530  211 00070FC0 GetLongPathNameTransactedA
        531  212 0005D390 GetLongPathNameTransactedW
        532  213 0001C200 GetLongPathNameW
        533  214 0004DB50 GetMailslotInfo
        534  215 000730D0 GetMaximumProcessorCount
        535  216 00003730 GetMaximumProcessorGroupCount
        536  217 000164A0 GetModuleFileNameA
        537  218 00017700 GetModuleFileNameW
        538  219 000165E0 GetModuleHandleA
        539  21A 0004C0B0 GetModuleHandleExA
        540  21B 0000B780 GetModuleHandleExW
        541  21C 00023730 GetModuleHandleW
        542  21D 00058DD0 GetNLSVersion
        543  21E 00058D70 GetNLSVersionEx
        544  21F 0004C1C0 GetNamedPipeAttribute
        545  220 0004D510 GetNamedPipeClientComputerNameA
        546  221 0004C1B0 GetNamedPipeClientComputerNameW
        547  222 0004D4D0 GetNamedPipeClientProcessId
        548  223 0004D490 GetNamedPipeClientSessionId
        549  224 000737E0 GetNamedPipeHandleStateA
        550  225 00073670 GetNamedPipeHandleStateW
        551  226 0004D640 GetNamedPipeInfo
        552  227 0004D450 GetNamedPipeServerProcessId
        553  228 0004D410 GetNamedPipeServerSessionId
        554  229 0000B7E0 GetNativeSystemInfo
        555  22A 00048F20 GetNextUmsListItem
        556  22B 0005E3E0 GetNextVDMCommand
        557  22C 0004D170 GetNumaAvailableMemoryNode
        558  22D 0004D0F0 GetNumaAvailableMemoryNodeEx
        559  22E 0004D3B0 GetNumaHighestNodeNumber
        560  22F 0004D020 GetNumaNodeNumberFromHandle
        561  230 0004D200 GetNumaNodeProcessorMask
        562  231 0004D180 GetNumaNodeProcessorMaskEx
        563  232 0004D350 GetNumaProcessorNode
        564  233 0004D280 GetNumaProcessorNodeEx
        565  234 0004D0C0 GetNumaProximityNode
        566  235 0004D070 GetNumaProximityNodeEx
        567  236 0006EDC0 GetNumberFormatA
        568  237 0004B7F0 GetNumberFormatEx
        569  238 0004C180 GetNumberFormatW
        570  239 00040E80 GetNumberOfConsoleFonts
        571  23A 0000B4A0 GetNumberOfConsoleInputEvents
        572  23B 00040B90 GetNumberOfConsoleMouseButtons
        573  23C 0001B580 GetOEMCP
        574  23D 00008800 GetOverlappedResult
        575  23E 00075510 GetPhysicallyInstalledSystemMemory
        576  23F 0004C0A0 GetPriorityClass
        577  240 000818B0 GetPrivateProfileIntA
        578  241 000814D0 GetPrivateProfileIntW
        579  242 00081600 GetPrivateProfileSectionA
        580  243 00082030 GetPrivateProfileSectionNamesA
        581  244 000066F0 GetPrivateProfileSectionNamesW
        582  245 00006720 GetPrivateProfileSectionW
        583  246 00081720 GetPrivateProfileStringA
        584  247 00006BF0 GetPrivateProfileStringW
        585  248 00081EA0 GetPrivateProfileStructA
        586  249 00081CF0 GetPrivateProfileStructW
        587  24A 00023690 GetProcAddress
        588  24B 00002E70 GetProcessAffinityMask
        589  24C 0004C720 GetProcessDEPPolicy
        590  24D 0004C910 GetProcessGroupAffinity
        591  24E 0004C7A0 GetProcessHandleCount
        592  24F 00023050 GetProcessHeap
        593  250 0004C090 GetProcessHeaps
        594  251 000081F0 GetProcessId
        595  252 0004C160 GetProcessIdOfThread
        596  253 0004C7F0 GetProcessIoCounters
        597  254 0004C080 GetProcessPreferredUILanguages
        598  255 0004C830 GetProcessPriorityBoost
        599  256 0004C970 GetProcessShutdownParameters
        600  257 00004380 GetProcessTimes
        601  258 00061920 GetProcessUserModeExceptionPolicy
        602  259 0004B9E0 GetProcessVersion
        603  25A 0005B0B0 GetProcessWorkingSetSize
        604  25B 00047F10 GetProcessWorkingSetSizeEx
        605  25C 0004CBD0 GetProcessorSystemCycleTime
        606  25D 000036D0 GetProductInfo
        607  25E 00081A10 GetProfileIntA
        608  25F 000819A0 GetProfileIntW
        609  260 000819C0 GetProfileSectionA
        610  261 00081950 GetProfileSectionW
        611  262 000819E0 GetProfileStringA
        612  263 00081970 GetProfileStringW
        613  264 0000A4D0 GetQueuedCompletionStatus
        614  265 0004C050 GetQueuedCompletionStatusEx
        615  266 0005DA90 GetShortPathNameA
        616  267 00009DB0 GetShortPathNameW
        617  268 00021E90 GetStartupInfoA
        618  269 00018070 GetStartupInfoW
        619  26A 0001D750 GetStdHandle
        620  26B 00059A20 GetStringScripts
        621  26C 00046850 GetStringTypeA
        622  26D 00046850 GetStringTypeExA
        623  26E 000085C0 GetStringTypeExW
        624  26F 00019060 GetStringTypeW
        625  270 0004CC40 GetSystemDEPPolicy
        626  271 000033A0 GetSystemDefaultLCID
        627  272 000094E0 GetSystemDefaultLangID
        628  273 0004B7E0 GetSystemDefaultLocaleName
        629  274 00003AF0 GetSystemDefaultUILanguage
        630  275 00019450 GetSystemDirectoryA
        631  276 00017120 GetSystemDirectoryW
        632  277 00047CE0 GetSystemFileCacheSize
        633  278 00063600 GetSystemFirmwareTable
        634  279 00016F70 GetSystemInfo
        635  27A 00008740 GetSystemPowerStatus
        636  27B 0004B7D0 GetSystemPreferredUILanguages
        637  27C 0004C6B0 GetSystemRegistryQuota
        638  27D 00023540 GetSystemTime
        639  27E 0004C040 GetSystemTimeAdjustment
        640  27F 00013F40 GetSystemTimeAsFileTime
        641  280 00008940 GetSystemTimes
        642  281 00061240 GetSystemWindowsDirectoryA
        643  282 00021CC0 GetSystemWindowsDirectoryW
        644  283 00062600 GetSystemWow64DirectoryA
        645  284 00062560 GetSystemWow64DirectoryW
        646  285 0008E530 GetTapeParameters
        647  286 0008E690 GetTapePosition
        648  287 0008E4B0 GetTapeStatus
        649  288 00061EE0 GetTempFileNameA
        650  289 0004C030 GetTempFileNameW
        651  28A 00062060 GetTempPathA
        652  28B 00062040 GetTempPathW
        653  28C 00002F40 GetThreadContext
        654  28D 00065560 GetThreadErrorMode
        655  28E 0004AE10 GetThreadGroupAffinity
        656  28F 0004AE50 GetThreadIOPendingFlag
        657  290 0004C170 GetThreadId
        658  291 000603E0 GetThreadIdealProcessorEx
        659  292 0000CB30 GetThreadLocale
        660  293 000056A0 GetThreadPreferredUILanguages
        661  294 00019740 GetThreadPriority
        662  295 0004C020 GetThreadPriorityBoost
        663  296 00050D10 GetThreadSelectorEntry
        664  297 0004AEB0 GetThreadTimes
        665  298 0004B7C0 GetThreadUILanguage
        666  299 00022B00 GetTickCount
        667  29A 00009450 GetTickCount64
        668  29B 0008D590 GetTimeFormatA
        669  29C 0008D4E0 GetTimeFormatEx
        670  29D 0000C830 GetTimeFormatW
        671  29E 000033C0 GetTimeZoneInformation
        672  29F 0004C010 GetTimeZoneInformationForYear
        673  2A0 0004B7A0 GetUILanguageInfo
        674  2A1 00049010 GetUmsCompletionListEvent
        675  2A2 00048DB0 GetUmsSystemThreadInformation
        676  2A3 000177A0 GetUserDefaultLCID
        677  2A4 0004C000 GetUserDefaultLangID
        678  2A5 0004B790 GetUserDefaultLocaleName
        679  2A6 00032DC0 GetUserDefaultUILanguage
        680  2A7 0006E190 GetUserGeoID
        681  2A8 0004B780 GetUserPreferredUILanguages
        682  2A9 0005E010 GetVDMCurrentDirectories
        683  2AA 000101D0 GetVersion
        684  2AB 000170C0 GetVersionExA
        685  2AC 0000D910 GetVersionExW
        686  2AD 00061BC0 GetVolumeInformationA
        687  2AE 0004BFC0 GetVolumeInformationByHandleW
        688  2AF 00022150 GetVolumeInformationW
        689  2B0 00070830 GetVolumeNameForVolumeMountPointA
        690  2B1 000707D0 GetVolumeNameForVolumeMountPointW
        691  2B2 000874F0 GetVolumePathNameA
        692  2B3 00010530 GetVolumePathNameW
        693  2B4 0005C4C0 GetVolumePathNamesForVolumeNameA
        694  2B5 0005C010 GetVolumePathNamesForVolumeNameW
        695  2B6 0004BFB0 GetWindowsDirectoryA
        696  2B7 000082B0 GetWindowsDirectoryW
        697  2B8 0000B710 GetWriteWatch
        698  2B9 00047550 GetXStateFeaturesMask
        699  2BA 00066A10 GlobalAddAtomA
        700  2BB 00002D70 GlobalAddAtomW
        701  2BC 000080C0 GlobalAlloc
        702  2BD 0004DC20 GlobalCompact
        703  2BE 000669E0 GlobalDeleteAtom
        704  2BF 000669F0 GlobalFindAtomA
        705  2C0 000233E0 GlobalFindAtomW
        706  2C1 00063900 GlobalFix
        707  2C2 0004E2B0 GlobalFlags
        708  2C3 000081B0 GlobalFree
        709  2C4 000669B0 GlobalGetAtomNameA
        710  2C5 00066980 GlobalGetAtomNameW
        711  2C6 0004E680 GlobalHandle
        712  2C7 0004E760 GlobalLock
        713  2C8 0000F090 GlobalMemoryStatus
        714  2C9 00008920 GlobalMemoryStatusEx
        715  2CA 00063920 GlobalReAlloc
        716  2CB 0004E400 GlobalSize
        717  2CC 000638C0 GlobalUnWire
        718  2CD 000638E0 GlobalUnfix
        719  2CE 0004E570 GlobalUnlock
        720  2CF 000638D0 GlobalWire
        721  2D0 00060110 Heap32First
        722  2D1 0004ACD0 Heap32ListFirst
        723  2D2 0004ABE0 Heap32ListNext
        724  2D3 0005FEA0 Heap32Next
        725  2D4          HeapAlloc (forwarded to NTDLL.RtlAllocateHeap)
        726  2D5 0004BFA0 HeapCompact
        727  2D6 000170E0 HeapCreate
        728  2D7 00011490 HeapDestroy
        729  2D8 00023070 HeapFree
        730  2D9 00001D20 HeapLock
        731  2DA 0004BF80 HeapQueryInformation
        732  2DB          HeapReAlloc (forwarded to NTDLL.RtlReAllocateHeap)
        733  2DC 0001C4A0 HeapSetInformation
        734  2DD          HeapSize (forwarded to NTDLL.RtlSizeHeap)
        735  2DE 0004BF70 HeapSummary
        736  2DF 00001D00 HeapUnlock
        737  2E0 000110E0 HeapValidate
        738  2E1 00001CE0 HeapWalk
        739  2E2 00045E90 IdnToAscii
        740  2E3 00045E30 IdnToNameprepUnicode
        741  2E4 00045DD0 IdnToUnicode
        742  2E5 00050BC0 InitAtomTable
        743  2E6 0004B1A0 InitOnceBeginInitialize
        744  2E7 0004B170 InitOnceComplete
        745  2E8 00006680 InitOnceExecuteOnce
        746  2E9          InitOnceInitialize (forwarded to NTDLL.RtlRunOnceInitialize)
        747  2EA          InitializeConditionVariable (forwarded to NTDLL.RtlInitializeConditionVariable)
        748  2EB 00047740 InitializeContext
        749  2EC          InitializeCriticalSection (forwarded to NTDLL.RtlInitializeCriticalSection)
        750  2ED 000164E0 InitializeCriticalSectionAndSpinCount
        751  2EE 000179B0 InitializeCriticalSectionEx
        752  2EF          InitializeProcThreadAttributeList (forwarded to api-ms-win-core-processthreads-l1-1-0.InitializeProcThreadAttributeList)
        753  2F0          InitializeSListHead (forwarded to NTDLL.RtlInitializeSListHead)
        754  2F1          InitializeSRWLock (forwarded to NTDLL.RtlInitializeSRWLock)
        755  2F2          InterlockedFlushSList (forwarded to NTDLL.RtlInterlockedFlushSList)
        756  2F3          InterlockedPopEntrySList (forwarded to NTDLL.RtlInterlockedPopEntrySList)
        757  2F4          InterlockedPushEntrySList (forwarded to NTDLL.RtlInterlockedPushEntrySList)
        758  2F5          InterlockedPushListSList (forwarded to NTDLL.RtlInterlockedPushListSList)
        759  2F6 00040F70 InvalidateConsoleDIBits
        760  2F7 00061990 IsBadCodePtr
        761  2F8 000619B0 IsBadHugeReadPtr
        762  2F9 000619A0 IsBadHugeWritePtr
        763  2FA 0004CB40 IsBadReadPtr
        764  2FB 0004CA60 IsBadStringPtrA
        765  2FC 0004CA00 IsBadStringPtrW
        766  2FD 0004CAB0 IsBadWritePtr
        767  2FE 0008D850 IsCalendarLeapDay
        768  2FF 00086AC0 IsCalendarLeapMonth
        769  300 00086B50 IsCalendarLeapYear
        770  301 00017980 IsDBCSLeadByte
        771  302 00002E50 IsDBCSLeadByteEx
        772  303 00008290 IsDebuggerPresent
        773  304 0004BF50 IsNLSDefinedString
        774  305 00045EF0 IsNormalizedString
        775  306 0004BF40 IsProcessInJob
        776  307 0004CC80 IsProcessorFeaturePresent
        777  308 0004CD50 IsSystemResumeAutomatic
        778  309 000095B0 IsThreadAFiber
        779  30A          IsThreadpoolTimerSet (forwarded to NTDLL.TpIsTimerSet)
        780  30B 00050EB0 IsTimeZoneRedirectionEnabled
        781  30C 000965B0 IsValidCalDateTime
        782  30D 00019080 IsValidCodePage
        783  30E 0004BF30 IsValidLanguageGroup
        784  30F 000190B0 IsValidLocale
        785  310 0004B770 IsValidLocaleName
        786  311 000091D0 IsWow64Process
        787  312 0003F960 K32EmptyWorkingSet
        788  313 0000A5C0 K32EnumDeviceDrivers
        789  314 00054180 K32EnumPageFilesA
        790  315 0003F790 K32EnumPageFilesW
        791  316 00053FD0 K32EnumProcessModules
        792  317 000699F0 K32EnumProcessModulesEx
        793  318 00053E80 K32EnumProcesses
        794  319 0000A680 K32GetDeviceDriverBaseNameA
        795  31A 00032C70 K32GetDeviceDriverBaseNameW
        796  31B 000541D0 K32GetDeviceDriverFileNameA
        797  31C 00054260 K32GetDeviceDriverFileNameW
        798  31D 00053D70 K32GetMappedFileNameA
        799  31E 0003F010 K32GetMappedFileNameW
        800  31F 00085230 K32GetModuleBaseNameA
        801  320 000795B0 K32GetModuleBaseNameW
        802  321 000852E0 K32GetModuleFileNameExA
        803  322 00079680 K32GetModuleFileNameExW
        804  323 00079510 K32GetModuleInformation
        805  324 00003790 K32GetPerformanceInfo
        806  325 0003F0F0 K32GetProcessImageFileNameA
        807  326 0003F1E0 K32GetProcessImageFileNameW
        808  327 00004100 K32GetProcessMemoryInfo
        809  328 00053E50 K32GetWsChanges
        810  329 00053E20 K32GetWsChangesEx
        811  32A 0003F2F0 K32InitializeProcessForWsWatch
        812  32B 0003F910 K32QueryWorkingSet
        813  32C 0003F8C0 K32QueryWorkingSetEx
        814  32D 00009010 LCIDToLocaleName
        815  32E 0004BF00 LCMapStringA
        816  32F 0004B710 LCMapStringEx
        817  330 00020DD0 LCMapStringW
        818  331 0005F840 LZClose
        819  332 0005F8F0 LZCloseFile
        820  333 0008F980 LZCopy
        821  334 0008E860 LZCreateFileW
        822  335 000437B0 LZDone
        823  336 00088190 LZInit
        824  337 0008E770 LZOpenFileA
        825  338 00094340 LZOpenFileW
        826  339 00087E40 LZRead
        827  33A 0005F9A0 LZSeek
        828  33B 000443A0 LZStart
        829  33C          LeaveCriticalSection (forwarded to NTDLL.RtlLeaveCriticalSection)
        830  33D          LeaveCriticalSectionWhenCallbackReturns (forwarded to NTDLL.TpCallbackLeaveCriticalSectionOnCompletion)
        831  33E 000172B0 LoadAppInitDlls
        832  33F 00017070 LoadLibraryA
        833  340 0000E3B0 LoadLibraryExA
        834  341 00016640 LoadLibraryExW
        835  342 00016F80 LoadLibraryW
        836  343 000988C0 LoadModule
        837  344 000198C0 LoadResource
        838  345 00015CA0 LoadStringBaseExW
        839  346 0004DAA0 LoadStringBaseW
        840  347 000147C0 LocalAlloc
        841  348 0004DC20 LocalCompact
        842  349 0004BEF0 LocalFileTimeToFileTime
        843  34A 0004DC40 LocalFlags
        844  34B 000147A0 LocalFree
        845  34C 0004DEF0 LocalHandle
        846  34D 00019900 LocalLock
        847  34E 0001C4C0 LocalReAlloc
        848  34F 0004DC20 LocalShrink
        849  350 0004DD80 LocalSize
        850  351 00019920 LocalUnlock
        851  352 00005670 LocaleNameToLCID
        852  353 00047610 LocateXStateFeature
        853  354 0004BED0 LockFile
        854  355 0004BEA0 LockFileEx
        855  356 00008720 LockResource
        856  357 00047BB0 MapUserPhysicalPages
        857  358 00047B80 MapUserPhysicalPagesScatter
        858  359 0000E390 MapViewOfFile
        859  35A 000231B0 MapViewOfFileEx
        860  35B 0004BE60 MapViewOfFileExNuma
        861  35C 0005FBA0 Module32First
        862  35D 0004A890 Module32FirstW
        863  35E 0005FA80 Module32Next
        864  35F 0004A7A0 Module32NextW
        865  360 0008F950 MoveFileA
        866  361 0008F920 MoveFileExA
        867  362 00003060 MoveFileExW
        868  363 000956C0 MoveFileTransactedA
        869  364 0008F720 MoveFileTransactedW
        870  365 0008F7F0 MoveFileW
        871  366 0008F8F0 MoveFileWithProgressA
        872  367 0008F6F0 MoveFileWithProgressW
        873  368 00009AC0 MulDiv
        874  369 00015B50 MultiByteToWideChar
        875  36A 0004BE50 NeedCurrentDirectoryForExePathA
        876  36B 00021C30 NeedCurrentDirectoryForExePathW
        877  36C 00033720 NlsCheckPolicy
        878  36D 0004BA20 NlsEventDataDescCreate
        879  36E 000091E4 NlsGetCacheUpdateCount
        880  36F 0003372C NlsUpdateLocale
        881  370 00033738 NlsUpdateSystemLocale
        882  371 0004BA10 NlsWriteEtwEvent
        883  372 00045F40 NormalizeString
        884  373 00061220 NotifyMountMgr
        885  374 0008D200 NotifyUILanguageChange
        886  375 000553D0 OpenConsoleW
        887  376 000177C0 OpenEventA
        888  377 0001C460 OpenEventW
        889  378 00080260 OpenFile
        890  379 000503B0 OpenFileById
        891  37A 00017230 OpenFileMappingA
        892  37B 00023660 OpenFileMappingW
        893  37C 0005BE10 OpenJobObjectA
        894  37D 0005BD50 OpenJobObjectW
        895  37E 00002CE0 OpenMutexA
        896  37F 00023510 OpenMutexW
        897  380 0007FDF0 OpenPrivateNamespaceA
        898  381 00072EC0 OpenPrivateNamespaceW
        899  382 0001CAD0 OpenProcess
        900  383          OpenProcessToken (forwarded to api-ms-win-core-processthreads-l1-1-0.OpenProcessToken)
        901  384 000443A0 OpenProfileUserMapping
        902  385 00060DD0 OpenSemaphoreA
        903  386 0004BE40 OpenSemaphoreW
        904  387 0001C560 OpenThread
        905  388          OpenThreadToken (forwarded to api-ms-win-core-processthreads-l1-1-0.OpenThreadToken)
        906  389 00060CA0 OpenWaitableTimerA
        907  38A 0004BE30 OpenWaitableTimerW
        908  38B 00004F60 OutputDebugStringA
        909  38C 0000B760 OutputDebugStringW
        910  38D 00055060 PeekConsoleInputA
        911  38E 0000CF60 PeekConsoleInputW
        912  38F 000066B0 PeekNamedPipe
        913  390 0000A500 PostQueuedCompletionStatus
        914  391 0004CE10 PowerClearRequest
        915  392 0007FEC0 PowerCreateRequest
        916  393 0004CDC0 PowerSetRequest
        917  394 0008E650 PrepareTape
        918  395 00095290 PrivCopyFileExW
        919  396 0008F280 PrivMoveFileIdentityW
        920  397 0005FDB0 Process32First
        921  398 00001E00 Process32FirstW
        922  399 0005FCC0 Process32Next
        923  39A 000020F0 Process32NextW
        924  39B 0000D950 ProcessIdToSessionId
        925  39C 0004BE20 PulseEvent
        926  39D 00049760 PurgeComm
        927  39E 00048580 QueryActCtxSettingsW
        928  39F 00001FE0 QueryActCtxW
        929  3A0          QueryDepthSList (forwarded to NTDLL.RtlQueryDepthSList)
        930  3A1 000656D0 QueryDosDeviceA
        931  3A2 00004560 QueryDosDeviceW
        932  3A3 000610F0 QueryFullProcessImageNameA
        933  3A4 0001D860 QueryFullProcessImageNameW
        934  3A5 000481C0 QueryIdleProcessorCycleTime
        935  3A6 00048150 QueryIdleProcessorCycleTimeEx
        936  3A7 00048750 QueryInformationJobObject
        937  3A8 00047A60 QueryMemoryResourceNotification
        938  3A9 00016500 QueryPerformanceCounter
        939  3AA 0000EC30 QueryPerformanceFrequency
        940  3AB 0004BA30 QueryProcessAffinityUpdateMode
        941  3AC 00048210 QueryProcessCycleTime
        942  3AD 00048270 QueryThreadCycleTime
        943  3AE 00047400 QueryThreadProfiling
        944  3AF 0004BA50 QueryThreadpoolStackInformation
        945  3B0 00048EE0 QueryUmsThreadInformation
        946  3B1 0005B0D0 QueryUnbiasedInterruptTime
        947  3B2 0000CE10 QueueUserAPC
        948  3B3 00011370 QueueUserWorkItem
        949  3B4 0000CF10 RaiseException
        950  3B5 0005AEB0 RaiseFailFastException
        951  3B6 0004F460 ReOpenFile
        952  3B7 0006A6B0 ReadConsoleA
        953  3B8 00055040 ReadConsoleInputA
        954  3B9 00054FF0 ReadConsoleInputExA
        955  3BA 00054FC0 ReadConsoleInputExW
        956  3BB 00055020 ReadConsoleInputW
        957  3BC 0006A500 ReadConsoleOutputA
        958  3BD 00079750 ReadConsoleOutputAttribute
        959  3BE 000797C0 ReadConsoleOutputCharacterA
        960  3BF 00079790 ReadConsoleOutputCharacterW
        961  3C0 0006A530 ReadConsoleOutputW
        962  3C1 0006A5A0 ReadConsoleW
        963  3C2 00002F80 ReadDirectoryChangesW
        964  3C3 00011500 ReadFile
        965  3C4 0004BDE0 ReadFileEx
        966  3C5 0004BE00 ReadFileScatter
        967  3C6 0004BDC0 ReadProcessMemory
        968  3C7 000473D0 ReadThreadProfilingData
        969  3C8 00014C10 RegCloseKey
        970  3C9 00002C80 RegCreateKeyExA
        971  3CA 0000D390 RegCreateKeyExW
        972  3CB 000574C0 RegDeleteKeyExA
        973  3CC 00057410 RegDeleteKeyExW
        974  3CD 0009B9F0 RegDeleteTreeA
        975  3CE 0009B540 RegDeleteTreeW
        976  3CF 0009A2E0 RegDeleteValueA
        977  3D0 00032A00 RegDeleteValueW
        978  3D1 000574E0 RegDisablePredefinedCacheEx
        979  3D2 00010260 RegEnumKeyExA
        980  3D3 000098C0 RegEnumKeyExW
        981  3D4 0009A940 RegEnumValueA
        982  3D5 0000DE50 RegEnumValueW
        983  3D6 00099740 RegFlushKey
        984  3D7 00005840 RegGetKeySecurity
        985  3D8 0009B410 RegGetValueA
        986  3D9 00016A10 RegGetValueW
        987  3DA 00016770 RegKrnGetGlobalState
        988  3DB 000163F0 RegKrnInitialize
        989  3DC 00099C60 RegLoadKeyA
        990  3DD 000082D0 RegLoadKeyW
        991  3DE 00044140 RegLoadMUIStringA
        992  3DF 0000CB70 RegLoadMUIStringW
        993  3E0 0000E290 RegNotifyChangeKeyValue
        994  3E1 0000D970 RegOpenCurrentUser
        995  3E2 00014D50 RegOpenKeyExA
        996  3E3 00014560 RegOpenKeyExW
        997  3E4 0000EE40 RegOpenUserClassesRoot
        998  3E5 0000AA00 RegQueryInfoKeyA
        999  3E6 0000D9C0 RegQueryInfoKeyW
       1000  3E7 00014EE0 RegQueryValueExA
       1001  3E8 00014A60 RegQueryValueExW
       1002  3E9 00099F00 RegRestoreKeyA
       1003  3EA 00099E00 RegRestoreKeyW
       1004  3EB 00099980 RegSaveKeyExA
       1005  3EC 000997F0 RegSaveKeyExW
       1006  3ED 0009A050 RegSetKeySecurity
       1007  3EE 0009A530 RegSetValueExA
       1008  3EF 0000AF40 RegSetValueExW
       1009  3F0 00099B60 RegUnLoadKeyA
       1010  3F1 00032940 RegUnLoadKeyW
       1011  3F2 0007F550 RegisterApplicationRecoveryCallback
       1012  3F3 0007F510 RegisterApplicationRestart
       1013  3F4 00041AB0 RegisterConsoleIME
       1014  3F5 0003FF70 RegisterConsoleOS2
       1015  3F6 000419D0 RegisterConsoleVDM
       1016  3F7 000172A0 RegisterWaitForInputIdle
       1017  3F8 0000F950 RegisterWaitForSingleObject
       1018  3F9 00004330 RegisterWaitForSingleObjectEx
       1019  3FA 0004E8D0 RegisterWowBaseHandlers
       1020  3FB 0005DFA0 RegisterWowExec
       1021  3FC 00048700 ReleaseActCtx
       1022  3FD 00022B90 ReleaseMutex
       1023  3FE          ReleaseMutexWhenCallbackReturns (forwarded to NTDLL.TpCallbackReleaseMutexOnCompletion)
       1024  3FF          ReleaseSRWLockExclusive (forwarded to NTDLL.RtlReleaseSRWLockExclusive)
       1025  400          ReleaseSRWLockShared (forwarded to NTDLL.RtlReleaseSRWLockShared)
       1026  401 00019760 ReleaseSemaphore
       1027  402          ReleaseSemaphoreWhenCallbackReturns (forwarded to NTDLL.TpCallbackReleaseSemaphoreOnCompletion)
       1028  403 0004BDB0 RemoveDirectoryA
       1029  404 00066A30 RemoveDirectoryTransactedA
       1030  405 00050C30 RemoveDirectoryTransactedW
       1031  406 0004BDA0 RemoveDirectoryW
       1032  407 00095790 RemoveLocalAlternateComputerNameA
       1033  408 0008FB90 RemoveLocalAlternateComputerNameW
       1034  409 0004E260 RemoveSecureMemoryCacheCallback
       1035  40A          RemoveVectoredContinueHandler (forwarded to NTDLL.RtlRemoveVectoredContinueHandler)
       1036  40B          RemoveVectoredExceptionHandler (forwarded to NTDLL.RtlRemoveVectoredExceptionHandler)
       1037  40C 000943F0 ReplaceFile
       1038  40D 00095170 ReplaceFileA
       1039  40E 000943F0 ReplaceFileW
       1040  40F 0004C5F0 ReplacePartitionUnit
       1041  410 0004CD30 RequestDeviceWakeup
       1042  411 0004CD30 RequestWakeupLatency
       1043  412 0000D9A0 ResetEvent
       1044  413 0000B6E0 ResetWriteWatch
       1045  414 0004B700 ResolveLocaleName
       1046  415          RestoreLastError (forwarded to NTDLL.RtlRestoreLastWin32Error)
       1047  416 000113A0 ResumeThread
       1048  417 0004B690 RtlAddFunctionTable
       1049  418 0004B6F0 RtlCaptureContext
       1050  419 0004B6E0 RtlCaptureStackBackTrace
       1051  41A 0004B670 RtlCompareMemory
       1052  41B 0004B650 RtlCopyMemory
       1053  41C 0004B680 RtlDeleteFunctionTable
       1054  41D 0004B6B0 RtlFillMemory
       1055  41E 0004B620 RtlInstallFunctionTableCallback
       1056  41F 0004B610 RtlLookupFunctionEntry
       1057  420 000226D8 RtlMoveMemory
       1058  421 00032D80 RtlPcToFileHeader
       1059  422 0004B5A0 RtlRaiseException
       1060  423 0004B600 RtlRestoreContext
       1061  424 0004B6A0 RtlUnwind
       1062  425 00032D90 RtlUnwindEx
       1063  426 0004B5B0 RtlVirtualUnwind
       1064  427          RtlZeroMemory (forwarded to NTDLL.RtlZeroMemory)
       1065  428 000545F0 ScrollConsoleScreenBufferA
       1066  429 000545C0 ScrollConsoleScreenBufferW
       1067  42A 00062250 SearchPathA
       1068  42B 00019DF0 SearchPathW
       1069  42C 0006F110 SetCalendarInfoA
       1070  42D 0004BD90 SetCalendarInfoW
       1071  42E 00066DB0 SetClientTimeZoneInformation
       1072  42F 00048500 SetComPlusPackageInstallStatus
       1073  430 0005F710 SetCommBreak
       1074  431 0005F620 SetCommConfig
       1075  432 00049670 SetCommMask
       1076  433 0005F200 SetCommState
       1077  434 00049570 SetCommTimeouts
       1078  435 00067270 SetComputerNameA
       1079  436 00096450 SetComputerNameExA
       1080  437 00096040 SetComputerNameExW
       1081  438 00051590 SetComputerNameW
       1082  439 00040A10 SetConsoleActiveScreenBuffer
       1083  43A 00040570 SetConsoleCP
       1084  43B 00016F00 SetConsoleCtrlHandler
       1085  43C 00041C10 SetConsoleCursor
       1086  43D 00040910 SetConsoleCursorInfo
       1087  43E 00040070 SetConsoleCursorMode
       1088  43F 0000D090 SetConsoleCursorPosition
       1089  440 00041AB0 SetConsoleDisplayMode
       1090  441 000406D0 SetConsoleFont
       1091  442 000418C0 SetConsoleHardwareState
       1092  443 00040270 SetConsoleHistoryInfo
       1093  444 00040660 SetConsoleIcon
       1094  445 00042070 SetConsoleInputExeNameA
       1095  446 000117E0 SetConsoleInputExeNameW
       1096  447 00041760 SetConsoleKeyShortcuts
       1097  448 00069E90 SetConsoleLocalEUDC
       1098  449 000443A0 SetConsoleMaximumWindowSize
       1099  44A 000416F0 SetConsoleMenuClose
       1100  44B 00019820 SetConsoleMode
       1101  44C 00040170 SetConsoleNlsMode
       1102  44D 0006AAB0 SetConsoleNumberOfCommandsA
       1103  44E 0006AAC0 SetConsoleNumberOfCommandsW
       1104  44F 0003FF00 SetConsoleOS2OemFormat
       1105  450 00069FE0 SetConsoleOutputCP
       1106  451 00055090 SetConsolePalette
       1107  452 00040D20 SetConsoleScreenBufferInfoEx
       1108  453 00040990 SetConsoleScreenBufferSize
       1109  454 00040750 SetConsoleTextAttribute
       1110  455 000555A0 SetConsoleTitleA
       1111  456 00055550 SetConsoleTitleW
       1112  457 00040890 SetConsoleWindowInfo
       1113  458          SetCriticalSectionSpinCount (forwarded to NTDLL.RtlSetCriticalSectionSpinCount)
       1114  459 0006A020 SetCurrentConsoleFontEx
       1115  45A 0004BD80 SetCurrentDirectoryA
       1116  45B 0001CAB0 SetCurrentDirectoryW
       1117  45C 00087C60 SetDefaultCommConfigA
       1118  45D 0007F940 SetDefaultCommConfigW
       1119  45E 000633C0 SetDllDirectoryA
       1120  45F 0004D8C0 SetDllDirectoryW
       1121  460 00066F10 SetDynamicTimeZoneInformation
       1122  461 0004BD70 SetEndOfFile
       1123  462 00047FA0 SetEnvironmentStringsA
       1124  463 0000B330 SetEnvironmentStringsW
       1125  464 0004BD60 SetEnvironmentVariableA
       1126  465 00016EE0 SetEnvironmentVariableW
       1127  466 0001BDC0 SetErrorMode
       1128  467 00013F00 SetEvent
       1129  468          SetEventWhenCallbackReturns (forwarded to NTDLL.TpCallbackSetEventOnCompletion)
       1130  469 0004BD50 SetFileApisToANSI
       1131  46A 00004460 SetFileApisToOEM
       1132  46B 00002D50 SetFileAttributesA
       1133  46C 00064FB0 SetFileAttributesTransactedA
       1134  46D 0004FD50 SetFileAttributesTransactedW
       1135  46E 000137A0 SetFileAttributesW
       1136  46F 0004FE80 SetFileBandwidthReservation
       1137  470 00050550 SetFileCompletionNotificationModes
       1138  471 0004BD40 SetFileInformationByHandle
       1139  472 000505C0 SetFileIoOverlappedRange
       1140  473 00011150 SetFilePointer
       1141  474 0000AF00 SetFilePointerEx
       1142  475 00076140 SetFileShortNameA
       1143  476 000650C0 SetFileShortNameW
       1144  477 00013880 SetFileTime
       1145  478 0004BD30 SetFileValidData
       1146  479 0004E990 SetFirmwareEnvironmentVariableA
       1147  47A 0004E8E0 SetFirmwareEnvironmentVariableW
       1148  47B 00021E60 SetHandleCount
       1149  47C 00005BB0 SetHandleInformation
       1150  47D 0005BBE0 SetInformationJobObject
       1151  47E 00054620 SetLastConsoleEventActive
       1152  47F 00022DF0 SetLastError
       1153  480 000964B0 SetLocalPrimaryComputerNameA
       1154  481 00096120 SetLocalPrimaryComputerNameW
       1155  482 0004BD10 SetLocalTime
       1156  483 0006F1F0 SetLocaleInfoA
       1157  484 0004BD20 SetLocaleInfoW
       1158  485 0004DAE0 SetMailslotInfo
       1159  486 0004CD30 SetMessageWaitingIndicator
       1160  487 00062690 SetNamedPipeAttribute
       1161  488 0004BD00 SetNamedPipeHandleState
       1162  489 0004BCF0 SetPriorityClass
       1163  48A 0004C8D0 SetProcessAffinityMask
       1164  48B 0004BA40 SetProcessAffinityUpdateMode
       1165  48C 00050D10 SetProcessDEPPolicy
       1166  48D 00045D90 SetProcessPreferredUILanguages
       1167  48E 0004C880 SetProcessPriorityBoost
       1168  48F 0001B5B0 SetProcessShutdownParameters
       1169  490 00061950 SetProcessUserModeExceptionPolicy
       1170  491 0005B0A0 SetProcessWorkingSetSize
       1171  492 00047E20 SetProcessWorkingSetSizeEx
       1172  493 0004D750 SetSearchPathMode
       1173  494 0004BCE0 SetStdHandle
       1174  495 0004BCD0 SetStdHandleEx
       1175  496 00047D80 SetSystemFileCacheSize
       1176  497 0004CEA0 SetSystemPowerState
       1177  498 00051250 SetSystemTime
       1178  499 000510A0 SetSystemTimeAdjustment
       1179  49A 0008E4E0 SetTapeParameters
       1180  49B 0008E710 SetTapePosition
       1181  49C 000609C0 SetTermsrvAppInstallMode
       1182  49D 00005490 SetThreadAffinityMask
       1183  49E 00002F10 SetThreadContext
       1184  49F 000655A0 SetThreadErrorMode
       1185  4A0 0004CE60 SetThreadExecutionState
       1186  4A1 00003630 SetThreadGroupAffinity
       1187  4A2 000088D0 SetThreadIdealProcessor
       1188  4A3 0004ADC0 SetThreadIdealProcessorEx
       1189  4A4 0000CDB0 SetThreadLocale
       1190  4A5 000043B0 SetThreadPreferredUILanguages
       1191  4A6 0001D990 SetThreadPriority
       1192  4A7 0004BCC0 SetThreadPriorityBoost
       1193  4A8 00008050 SetThreadStackGuarantee
       1194  4A9          SetThreadToken (forwarded to api-ms-win-core-processthreads-l1-1-0.SetThreadToken)
       1195  4AA 00016D40 SetThreadUILanguage
       1196  4AB 0004BA60 SetThreadpoolStackInformation
       1197  4AC          SetThreadpoolThreadMaximum (forwarded to NTDLL.TpSetPoolMaxThreads)
       1198  4AD 0004BA70 SetThreadpoolThreadMinimum
       1199  4AE          SetThreadpoolTimer (forwarded to NTDLL.TpSetTimer)
       1200  4AF          SetThreadpoolWait (forwarded to NTDLL.TpSetWait)
       1201  4B0 000670D0 SetTimeZoneInformation
       1202  4B1 000479E0 SetTimerQueueTimer
       1203  4B2 00048EB0 SetUmsThreadInformation
       1204  4B3 00019B70 SetUnhandledExceptionFilter
       1205  4B4 0006DF30 SetUserGeoID
       1206  4B5 0005E1D0 SetVDMCurrentDirectories
       1207  4B6 000735D0 SetVolumeLabelA
       1208  4B7 000731E0 SetVolumeLabelW
       1209  4B8 00087BF0 SetVolumeMountPointA
       1210  4B9 000876C0 SetVolumeMountPointW
       1211  4BA 00008890 SetWaitableTimer
       1212  4BB          SetWaitableTimerEx (forwarded to api-ms-win-core-threadpool-l1-1-0.SetWaitableTimerEx)
       1213  4BC 00047490 SetXStateFeaturesMask
       1214  4BD 0004A330 SetupComm
       1215  4BE 00041BB0 ShowConsoleCursor
       1216  4BF 00072C90 SignalObjectAndWait
       1217  4C0 000198E0 SizeofResource
       1218  4C1 00022B70 Sleep
       1219  4C2 0004B230 SleepConditionVariableCS
       1220  4C3 0004B1E0 SleepConditionVariableSRW
       1221  4C4 00022BB0 SleepEx
       1222  4C5 00058D60 SortCloseHandle
       1223  4C6 00018220 SortGetHandle
       1224  4C7          StartThreadpoolIo (forwarded to NTDLL.TpStartAsyncIoOperation)
       1225  4C8          SubmitThreadpoolWork (forwarded to NTDLL.TpPostWork)
       1226  4C9 00002F60 SuspendThread
       1227  4CA 00022920 SwitchToFiber
       1228  4CB 0000B6C0 SwitchToThread
       1229  4CC 00023560 SystemTimeToFileTime
       1230  4CD 0004BCB0 SystemTimeToTzSpecificLocalTime
       1231  4CE 00006580 TerminateJobObject
       1232  4CF 0004BCA0 TerminateProcess
       1233  4D0 00011280 TerminateThread
       1234  4D1 0004B020 TermsrvAppInstallMode
       1235  4D2 0004AA70 Thread32First
       1236  4D3 0004A980 Thread32Next
       1237  4D4 00017100 TlsAlloc
       1238  4D5 00011590 TlsFree
       1239  4D6 00022BD0 TlsGetValue
       1240  4D7 00015CD0 TlsSetValue
       1241  4D8 0004AB60 Toolhelp32ReadProcessMemory
       1242  4D9 0004BC60 TransactNamedPipe
       1243  4DA 000494A0 TransmitCommChar
       1244  4DB          TryAcquireSRWLockExclusive (forwarded to NTDLL.RtlTryAcquireSRWLockExclusive)
       1245  4DC          TryAcquireSRWLockShared (forwarded to NTDLL.RtlTryAcquireSRWLockShared)
       1246  4DD          TryEnterCriticalSection (forwarded to NTDLL.RtlTryEnterCriticalSection)
       1247  4DE 0000A570 TrySubmitThreadpoolCallback
       1248  4DF 0004BC50 TzSpecificLocalTimeToSystemTime
       1249  4E0 00062C40 UTRegister
       1250  4E1 000437B0 UTUnRegister
       1251  4E2 00048FB0 UmsThreadYield
       1252  4E3 00099330 UnhandledExceptionFilter
       1253  4E4 0004BC30 UnlockFile
       1254  4E5 0004BC10 UnlockFileEx
       1255  4E6 00023580 UnmapViewOfFile
       1256  4E7 0007F530 UnregisterApplicationRecoveryCallback
       1257  4E8 0007F500 UnregisterApplicationRestart
       1258  4E9 00041AB0 UnregisterConsoleIME
       1259  4EA 00008850 UnregisterWait
       1260  4EB 00004290 UnregisterWaitEx
       1261  4EC 00090E00 UpdateCalendarDayOfWeek
       1262  4ED          UpdateProcThreadAttribute (forwarded to api-ms-win-core-processthreads-l1-1-0.UpdateProcThreadAttribute)
       1263  4EE 00086D50 UpdateResourceA
       1264  4EF 0007F1C0 UpdateResourceW
       1265  4F0 0003FE20 VDMConsoleOperation
       1266  4F1 0005EDF0 VDMOperationStarted
       1267  4F2 0004BC00 VerLanguageNameA
       1268  4F3 0004BBF0 VerLanguageNameW
       1269  4F4          VerSetConditionMask (forwarded to NTDLL.VerSetConditionMask)
       1270  4F5 000550A0 VerifyConsoleIoHandle
       1271  4F6 00045FD0 VerifyScripts
       1272  4F7 00063240 VerifyVersionInfoA
       1273  4F8 0000B350 VerifyVersionInfoW
       1274  4F9 000167A0 VirtualAlloc
       1275  4FA 0004BBD0 VirtualAllocEx
       1276  4FB 0004BBA0 VirtualAllocExNuma
       1277  4FC 00011260 VirtualFree
       1278  4FD 0004BB90 VirtualFreeEx
       1279  4FE 00047C90 VirtualLock
       1280  4FF 00002EF0 VirtualProtect
       1281  500 0004BB70 VirtualProtectEx
       1282  501 0001BD40 VirtualQuery
       1283  502 0004BB60 VirtualQueryEx
       1284  503 00047C40 VirtualUnlock
       1285  504 0004C5E0 WTSGetActiveConsoleSessionId
       1286  505 00049360 WaitCommEvent
       1287  506 000777B0 WaitForDebugEvent
       1288  507 00011170 WaitForMultipleObjects
       1289  508 00022CA0 WaitForMultipleObjectsEx
       1290  509 00022B20 WaitForSingleObject
       1291  50A 00022FF0 WaitForSingleObjectEx
       1292  50B          WaitForThreadpoolIoCallbacks (forwarded to NTDLL.TpWaitForIoCompletion)
       1293  50C          WaitForThreadpoolTimerCallbacks (forwarded to NTDLL.TpWaitForTimer)
       1294  50D          WaitForThreadpoolWaitCallbacks (forwarded to NTDLL.TpWaitForWait)
       1295  50E          WaitForThreadpoolWorkCallbacks (forwarded to NTDLL.TpWaitForWork)
       1296  50F 000627E0 WaitNamedPipeA
       1297  510 0004BB50 WaitNamedPipeW
       1298  511          WakeAllConditionVariable (forwarded to NTDLL.RtlWakeAllConditionVariable)
       1299  512          WakeConditionVariable (forwarded to NTDLL.RtlWakeConditionVariable)
       1300  513 0007F3F0 WerGetFlags
       1301  514 00094330 WerRegisterFile
       1302  515 0008E490 WerRegisterMemoryBlock
       1303  516 00087160 WerRegisterRuntimeExceptionModule
       1304  517 0007F400 WerSetFlags
       1305  518 0008E4A0 WerUnregisterFile
       1306  519 0008E480 WerUnregisterMemoryBlock
       1307  51A 00087150 WerUnregisterRuntimeExceptionModule
       1308  51B 0005B120 WerpCleanupMessageMapping
       1309  51C 0007F410 WerpInitiateRemoteRecovery
       1310  51D 00087140 WerpNotifyLoadStringResource
       1311  51E 00087120 WerpNotifyLoadStringResourceEx
       1312  51F 00096010 WerpNotifyUseStringResource
       1313  520 00087110 WerpStringLookup
       1314  521 000235F0 WideCharToMultiByte
       1315  522 00098D80 WinExec
       1316  523 0004BB40 Wow64DisableWow64FsRedirection
       1317  524 0004FFD0 Wow64EnableWow64FsRedirection
       1318  525 0004AFA0 Wow64GetThreadContext
       1319  526 00050CC0 Wow64GetThreadSelectorEntry
       1320  527 0004BB30 Wow64RevertWow64FsRedirection
       1321  528 0004AF70 Wow64SetThreadContext
       1322  529 0004AF40 Wow64SuspendThread
       1323  52A 0006A560 WriteConsoleA
       1324  52B 00054FA0 WriteConsoleInputA
       1325  52C 000416D0 WriteConsoleInputVDMA
       1326  52D 000416B0 WriteConsoleInputVDMW
       1327  52E 00054F80 WriteConsoleInputW
       1328  52F 0006A4A0 WriteConsoleOutputA
       1329  530 00054980 WriteConsoleOutputAttribute
       1330  531 000549F0 WriteConsoleOutputCharacterA
       1331  532 000549C0 WriteConsoleOutputCharacterW
       1332  533 0006A4D0 WriteConsoleOutputW
       1333  534 00013D40 WriteConsoleW
       1334  535 000235A0 WriteFile
       1335  536 0004BB10 WriteFileEx
       1336  537 0004BAF0 WriteFileGather
       1337  538 000815A0 WritePrivateProfileSectionA
       1338  539 00081400 WritePrivateProfileSectionW
       1339  53A 000816B0 WritePrivateProfileStringA
       1340  53B 00081460 WritePrivateProfileStringW
       1341  53C 00081B90 WritePrivateProfileStructA
       1342  53D 00081A20 WritePrivateProfileStructW
       1343  53E 0004BAD0 WriteProcessMemory
       1344  53F 000819B0 WriteProfileSectionA
       1345  540 00081940 WriteProfileSectionW
       1346  541 000819D0 WriteProfileStringA
       1347  542 00081960 WriteProfileStringW
       1348  543 0008E590 WriteTapemark
       1349  544 000486D0 ZombifyActCtx
       1350  545          __C_specific_handler (forwarded to NTDLL.__C_specific_handler)
       1351  546          __chkstk (forwarded to NTDLL.__chkstk)
       1352  547          __misaligned_access (forwarded to NTDLL.__misaligned_access)
       1353  548 00011050 _hread
       1354  549 00080140 _hwrite
       1355  54A 000114B0 _lclose
       1356  54B 00080190 _lcreat
       1357  54C 00011090 _llseek
       1358  54D          _local_unwind (forwarded to NTDLL._local_unwind)
       1359  54E 000801F0 _lopen
       1360  54F 00011050 _lread
       1361  550 00080140 _lwrite
       1362  551 0004E110 lstrcat
       1363  552 0004E110 lstrcatA
       1364  553 0004E070 lstrcatW
       1365  554 00061230 lstrcmp
       1366  555 00061230 lstrcmpA
       1367  556 0001D9C0 lstrcmpW
       1368  557 000040A0 lstrcmpi
       1369  558 000040A0 lstrcmpiA
       1370  559 00011930 lstrcmpiW
       1371  55A 0004E160 lstrcpy
       1372  55B 0004E160 lstrcpyA
       1373  55C 0004E0D0 lstrcpyW
       1374  55D 0004BAC0 lstrcpyn
       1375  55E 0004BAC0 lstrcpynA
       1376  55F 0004BAB0 lstrcpynW
       1377  560 0004BAA0 lstrlen
       1378  561 0001CAF0 lstrlenA
       1379  562 00013EC0 lstrlenW
       1380  563 00051CB0 uaw_lstrcmpW
       1381  564 00051CA0 uaw_lstrcmpiW
       1382  565 00067AF0 uaw_lstrlenW
       1383  566 00051D40 uaw_wcschr
       1384  567 00051D10 uaw_wcscpy
       1385  568 00051D00 uaw_wcsicmp
       1386  569 00051CE0 uaw_wcslen
       1387  56A 00051CC0 uaw_wcsrchr
************************************************************************************/